5

I am having a heck of a time deploying a simple web part to a multi-server farm. The error I receive when deploying is: Error occurred in deployment step 'Activate Features': Feature with Id 'cd488818-dc38-4b3c-aa72-f34ce87a3d41' is not installed in this farm, and cannot be added to this scope.

It has been about a year since I deployed custom web parts to SharePoint 2010. Here are my questions:

  • Is there a way to deploy from VS2010 to a multi-server farm?
  • Can visual web part solutions be deployed only to a site collection? Or only to a web app? What's the scope that I have to use?
  • Is there a PS script to do this?
1
  • Is cd488818-dc38-4b3c-aa72-f34ce87a3d41 the Id of your feature or is it a feature dependency? Commented Jun 1, 2012 at 19:32

4 Answers 4

9

Visual Studio deploys to the server it's installed on, and as a best practice it shouldn't be installed on any production server. During the deployment process, the applicable bits for the solution will automatically be "deployed" to any server in the environment with the Foundation Web Application role. For deployment to production, the correct process would be to generate a WSP file from Visual Studio, load that to a single server in the environment, and use PowerShell Add-SPSolution c:\path\to\solution.wsp to add the file to the solution store. You can then use either Central Administration or PowerShell to perform the "deployment".

Once deployed, your feature(s) can be activated, either through the UI, or through PowerShell. If you have a lot of sites to activate the feature on, say you need to activate branding throughout the environment, you can use something like Get-SPSite | Enable-SPFeature -Identity "SolutionName" -Url $_.Url which will iterate through all site collections and activate the SolutionName solution on each one. Note that this does need to match the scope for your feature (you wouldn't loop through sites for a web application feature, as an example).

1
  • All the deployment to production is the same regardless of number of Servers (Except SharePoint has to do more work when multiple). If you have more than 20 site collections you need to add -Limit All to Get-SPSite. A Visual web part usually has an elements.xml with a <Module> element to add the .webpart file to the Gallery <Module>s can only be in features with scope Site (Site Collection) or Web (Site) and you usually want to use scope Site Commented Jun 1, 2012 at 19:31
1

For Web Parts your feature must use the Site scope. The Web Part Gallery only exists on the Site Collection level.

0

I will add the following mentioned to the valid answers before me, in an attempt to answer some of your questions:

  1. You can deploy a Visual Web Part for a single Site Collection if you make it as a Sandbox solution and upload it to the Gallery (CKSDEV NuGet Package in Visual Studio 2010 is needed to get you support for Visual Web Part in Sandbox). If you have a Farm solution, you can Activate it only on the specific site collection (or simply hide-it from the WebParts Gallery - more work).
  2. Multi-farm deployment requires re-deploying your solution multiple times PER FARM
  3. Other participants have responded
0

Ensure that the service : Microsoft SharePoint Foundation Web Application (using central administration) is stop on your application server it should be better. Sylvain

1
  • This does not really answer any of the three questions posed by the OP. It may have to deal with the problem described in the question, but there is no request to resolve it.
    – wjervis
    Commented Mar 4, 2015 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.