If you encounter the error "The Project Item "[Item Name]" cannot be deployed through a Feature with Farm scope." when you are deploying a Visual Studio 2010 SharePoint project, the problem may be that you have done what I have just done - try to force the wrong item type to deploy...
Let me explain: Lets say you want to add a custom action - something that can be deployed as a farm feature. But by mistake you added a project item of type "Module" instead of "Empty Element". You think to yourself - I can just clear the module, and add the custom action instead in the XML. The intellisense definitly supports it.
Well, it turns out that Visual Studio remembers that you added the XML as a module, and even if you edit out the module instructions, it will not let you deploy the feature as a farm feature, since modules are not supported at the farm scope.
The solution? delete your module, and add an empty element.
Sharepoint Tips And Tricks is Ishai Sagi's sharepoint information blog. It specializes in Microsoft SharePoint technologies, including web parts, development, configuration, customization, and best practices for the use of Microsoft SharePoint Server and Windows SharePoint Services. It also provides some related Office Information, including VSTO and VSTA and other office application development tips.
Friday, January 07, 2011
Adding Modules or Elements to a VS2010 SharePoint project
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment