.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Deploying a .thmx theme as a farm solution

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :SharePoint

Hello everybody,

I am another beginner to Visual Studio 2010 + SP 2010 and I have created:

1.     A custom theme (.thmx file)

2.     A feature to deploy it to my SharePoint farm as a solution, and this is how the FeatureActivated method look like:

        public override void FeatureActivated(SPFeatureReceiverProperties properties)

            SPWeb currentWeb = (SPWeb)properties.Feature.Parent;

            currentWeb.AllowUnsafeUpdates = true;

            currentWeb.SiteLogoUrl = "**url to logo1**";


            foreach (ThmxTheme theme2 in ThmxTheme.GetManagedThemes(currentWeb.Site))

View Complete Post

More Related Resource Links

Deploying a custom theme as a farm solution

Hello,   I am a beginner to Visual Studio 2010 + Sharepoint 2010 - I have created a custom theme and would like to deploy it to my dev Sharepoint farm as a solution.  I've added the "Sharepoint mapped folder.." (..TEMPLATE\GLOBAL\Lists\themes) and added my thmx to that folder in the project.  When the solution is deployed to my dev farm the custom theme gets added to the 14 hive \TEMPLATE\GLOBAL\Lists\themes folder but when a new site is created the theme is not available from Site Settings->Site Theme or in the Theme Gallery.  What am I missing here?

BDC/BCS Model doesn't show up when deploying custom bcs solution to farm



I've created a custom BCS solution in VS2010, for SP2010, it's based on a .net assembly and in dev/test it all works fine.

Unfortaunetly, when I package it for production, although it deploys successfully - or so everything says - if I look in Central Admin for the BDC model, it's not there!

Has anybody else come across the same issue?

Please let me know what other information you might need.

Kind regards,


Error When Deploying Multiple Projects in a Solution

We have a solution with 16 projects, where all but 3 are Sharepoint 2010 projects. When we deploy the projects in VS2010 individually, everything is fine, but when we deploy the solution (right-click, deploy), we experience one of two problems: 1. Not all projects get deployed, some just give the following message: "Deployment was not performed for this project because it is a dependent project." 2. Some of the projects (currently always the same three Sharepoint2010 projects) give the following error during the "Recycle IIS Application Pool" step: "Error occurred in deployment step 'Recycle IIS Application Pool': The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout." We don't have any dependencies set up in the projects except for the ones which are automatically created when we add project references. If we do two subsequent solution deployments, the first one will suffer from issue 1 and the second from issue 2 as well. When issue 2 happens, the faulty projects can't even be deployed individually until VS2010 has been restarted.   A Google search has revealed nothing at all. We're at a loss and it's getting to be very frustrating for the entire team. Any help would be appreciated.   Thanks, Bjoern

Deploying and Using jQuery with a SharePoint 2010 Sandboxed Solution

If you're an avid reader of this blog, you probably now that I'm quite a big fan of the jQuery Javascript library, especially in combination with SharePoint sites. For a while I've been trying to find a mechanism to deploy jQuery and add a reference to it on all SharePoint pages of a site, by just using a Sandboxed Solution. The first part, deploying the jQuery file, is really easy; this can be done in a Module in a SharePoint project. The second part was more of a challenge; making sure the jQuery file got referenced in all pages of a SharePoint site. My initial thought was to do this by using the AdditionalPageHead Delegate control, but it's not possible in a Sandboxed Solution (you need to deploy the .ASCX to the SharePoint root). My second thought was to use the new ScriptSrc attribute you can use in a CustomAction (I wrote about this attribute some time ago). But initially I was under the impression that the ScriptSrc attribute could only target Javascript files loaded from the SharePoint Root (the \LAYOUTS) folder, resulting in a no-go for a Sandboxed Solution as well. Daniel McPherson stumbled upon this issue as well, but neatly solved it using Javascript to add the reference dynamically. But apparently you can make use of the ScriptSrc attribute to reference files from the Virtual File System (e.g. a Document Library in a site) as well! (thank you Frederic Dobon for men

Deploying sandboxed solution

When I am deploying my sandboxed solution with Power Shell it deploys globally as full trust and not as sandboxed (there is nothing in the solution gallery). Here is my script: ADD-SPSolution -LiteralPath $wspPath Install-SPsolution -Identity $SolutionId -Force:$true -GACDeployment:$true -Local:$true -WebApplication $UrlSiteCollection Enable-SPfeature -Identity $SiteCollectionItemsFeature -Force:$true -URL $UrlSiteCollection The solution is deployed as sandboxed from Visual Studio, but not from this script. Am I missing some option on Install-SPSolution?

Deploying A Solution Issue

I am trying to create a column whereby i can generate a Unique ID for my documents. I have downloaded and installed the UniqueColumnPolicy.wsp from http://blogs.salmanghani.info/?p=570 and i can confirm that in the Central Admin Site under Solution Management the solution has been deployed globally, but i dont see the solution in the List Settings where the article says it should be??? Has anyone any ideas on this? Have i missed a step somewhere?

Create Custom Site Template & Deploy as Farm Solution


So I've seen a few posts and blogs about this, but nothing with the specific error I'm getting.  All I'm trying to do is create a custom site template from an existing site (now WSP), and make that custom template available in CA so I can create host-named site collections from that template in PowerShell.  Apparenly this was a lot easier in 2007, as you could just save your template as STP, and run some stsadm addsolution to get it in the farm.  With 2010, I've read there are 2 options:

  1. Install-SPWebTemplate
  2. Deploy via Visual Studio 2010

I've tried running Install-SPWebTemplate (which only takes CAB files), and NOTHING I do works.  I've created a cab from the WSP with makecab, I've renamed the WSP to CAB, and all I get is "cannot find or parse web template file".  So on to VS2010.

Using this article as a guide (http://msdn.microsoft.com/en-us/library/ff408263.aspx), I created a new 2010 Import existing solution project, left all items selected, and the import was successful.  I made a change or two to the ONET.xml to fix some things, and then I just try to deploy it to the farm.  Whether I set the URL to the root intranet site, or the CA URL, I get deployment conflict errors:

"The URL or

Deploying on a Web Farm


I use session variables - and unfortunately my website is deployed on GoDaddy's shared server environment.  Hopefully we will be successful and be able to get their dedicated server services soon.

As you can imagine, sometimes the server farm moves my hosting from one server to another and *poof* - all the session variables evaporate, and down she goes with a crash!

Is there a way to handle this?  Will switching to sql to store session variable values work (what is the term for that)?

Error messages when deploying SSAS 2008 solution


I'm working on an AS 2008 project using VS2008. The relational database for the data source is SQL Sever 2008 R2 CTP (n.b correction from original post), and so is the target server I am trying to deploy to. When I try to deploy the solution the following errors are returned:

Error 5 Internal error: Invalid enumeration value. Please call customer support! is not a valid value for this element.  0 0 

Error 6 An error occurred while parsing the 'StorageMode' element at line 1, column 11865 ('http://schemas.microsoft.com/analysisservices/2003/engine' namespace) under Load/ObjectDefinition/Dimension/StorageMode.  0 0 

Error 7 Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, '\\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\AMS Analysis Services 2008.0.db\Dim Date.19.dim.xml'.  0 0 

I'm afraid I'm a bit stumped by these. Is it something to do with the fact that the target Analysis Services server is running R2? If so what can I do to deploy to that box?


Solution Deployment failed in Server Farm - Some of the files failed to copy during deployment of th


Hi guys,

I created a solution package in my development environment that works well. When I try to deploy it in a test environment that is a farm with two web front end(card0023 / card0024) servers and a application server(where I have the central administration / card0027) I got the error bellow:

Deployment Status: Error
Deployed To: None
Last Operation Result: Some of the files failed to copy during deployment of the solution.
Last Operation Details: CARD0023: http://card0027:11000/ : The solution was succesfully deployed.
    CARD0027: http://card0027:11000/ : The solution was succesfully deployed.
   CARD0023: http://card0027:11000/ : The solution was succesfully deployed.
   CARD0024: http://card0027:11000/ : The solution was succesfully deployed.
   CARD0027: http://card0027:11000/ : SharePoint - 11000 : Error: The web.config is missing from this IIS Web Site: C:\Inetpub\wwwroot\wss\VirtualDirectories\11000\web.config. 
Someone can help me?


André Rentes

Content Editor text format functionality lost after deploying branding solution package


I've got two identical SharePoint 2010 servers.  One is a dev box and one is production.  We've got a branding solution package.  After deploying the package on the production server, when I go into edit a page, the text format functionality in the content editor works fine, i.e. I can change font, font size, font color, etc.  However, when I deploy the solution package on the dev server and then attempt to edit a page, the text format functionality is disabled/broken.  I can utilize bold, underline, or italicize but cannot change font, font color, font size, etc. 

I've copied a site collection from my production site (which works perfectly) over to the dev site with the same results, meaning once on the dev box, the copied site collection no longer has editing functionalilty in the content editor. Permissions are set the same on both boxes and as mentioned, editing works fine until deployment of the solution package on the dev box.   Any help would be greatly appreciated. 

Could Visual Studio installed on my Dev box cause this?


Failed to create receiver object when deploying solution



I get the following error

Failed to create receiver object from assembly "MySolution, Version=, Culture=neutral, PublicKeyToken=d398c9a30aa5e960", class "MySolution.Features.MyFeature.MyEventReceiver" for feature "MySolution_MyFeature" (ID: d159bf93-828b-44d6-a449-b1fe4b8c6066).: System.ArgumentNullException: Value cannot be null.
Parameter name: type
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

when deploying my solution using stsadm.

.\stsadm -o deploysolution -name MySolution.wsp -allowgacdeployment -immediate
.\stsadm -o execadmsvcjobs

If I redeploy it using the same stsadm commands again it works.

The feature event receiver is in a dll that is deployed in the GAC in the same solution.

This has worked before and I wonder if there is some way I can troubleshoot this



Help with deploying a solution


I created a Visual Web Part package and I need to deploy it to the server.

I copied the .wsp file to the server and loaded the solution in SP 2010.

It won't let me activate the solution.

Does anyone have a link to install the wsp correctly?


I'm guess I need to add it to the SafeControls section so I can add it. Not sure how to do that tho.,

Theme (.thmx) options - CSS and HTML of them all


I wanted to get a better, clearer view, on all of the themeing options in the new theme engine in 2010. I wanted to know how to apply each of the colours, Dark 1&2, Light 1&2, Accent 1-6, Hyperlink, Blend, Tint, Fill and display all of those options on a single page.

So I decided to write all the CSS and HTML to achive this.

Here is the CSS: http://pastebin.com/7TRACKs1

Here is the HTML: http://pastebin.com/Rq53G5fi


To get this all working, add the CSS to your CSS in a themeable directory. Then copy and paste the HTML into one of your Sharepoint pages.

Apply a theme (thmx) and now you should find that all of the colour variants and various image manipulation techniques are visible on the page to see in all there glory.

Hope it helps!


Can't get new assembly name recognized when deploying Solution



I've got a problem I've never had before.  I have a simple Solution/Feature with a web part, and after working on the web part, I decided to change the name of the assembly.  I have confirmed that all references to the assembly have been changed as well to the new name everywhere in the code/elements.xml, etc.  When I deploy/activate the Feature, the correct new name is added to the GAC and to Safe Controls in the web.config.  However, when I go to add the Web Part to a page, I get an error and in the Logs it is clearly attempting to reference the previous name of the assembly for the <type name='[namespace], [old assembly name], [version], [key token] /> element in the .webpart file.

I have confirmed that I can go to the Hive, find and open the .webpart in notepad and it is indeed using the new Assembly name, however in the logs it is attempting to locate the old one.

I have done a restart to try and clear everything, but it is still happening.  I've done a complete search through the solution for any instances of the old name (including the Project Properties, etc.), and the old name is no where.

So, what is going on?  Why can't I get the system to reference the new assembly name when adding the web part to a page?


Custom Timer Job deploying at Farm level



I am trying to develop a timer job that is deployed at Farm Level. can anyone point me to an example of how to deploy it?

(I am looking for code in FeatureActivated and deactivated event)



Complete SQL Solution

SQL Server Solutions: SQL Server 2000/2005 Related Free Snippets.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend