SharePoint 2010 & Visual Studio 2010 error ocurred Activate Features Feature with ID installed in this farm cannot be added to this scope.
Hello
Maybe most of you have faced the following VS 2010 error message when trying to debug or deploy a wsp file via VS 2010 in a multi-server farm:
Error occurred in deployment step 'Activate Features': Feature with Id '2447ad0c-98d2-4363-9ef0-f217694f804e' is not installed in this farm, and cannot be added to this scope.
Basically the error happens because VS 2010 do not support features activation on multi-server farms.
However ,the devil is in the details, the exact explanation is in a previous step. It turns out that VS 2010 internally implements a call to the method SPSolution.DeployLocal https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsolution.deploylocal.aspx . That method is intended for troubleshooting purpouses of wsp files and as you can read on the MSDN documentation it performs a local deployment instead of an immediate deployment (Only to one sever of the farm)
Therefore, the only solution to avoid the situation is to compile the code (build o re-build) , go to the VS 2010 top menu and select build -> package. After that a new wsp file will be created on the BIN folder of the project.
Eventually, now you are free of selecting ,PowerShell or STSAdm, in order to add a solution, deploy it and activate it
Thanks
Kind Regards.
Héctor Calvarro Martín. SharePoint Dev. Microsoft Support Engineer for DEV EMEA
Comments
- Anonymous
March 28, 2013
Can we debug the code using visual studio in this case? B/c it will throw an error while deploying itself. Please let me know - Anonymous
September 24, 2013
thank you , but what about the need for debugging - Anonymous
January 30, 2014
Hi,We had the same problem. Actually we would like the debug the code in TEST env.Because some of the webpart functionality we have to test those are not available in Dev.Could you please tell me is there any way to debug.Thanks,Krishna - Anonymous
April 21, 2015
To debug solutions that have been deployed in this manner, simply click Debug - Attach to Process, and select the IIS process running your SharePoint site.