Preventing newly added project items from being automatically added to Features


The new Visual Studio 2010 SharePoint Development Tools not only simplify working with SharePoint Solutions but are also a great productivity booster. By encapsulating the internal working of packaging SharePoint artifacts developers can focus on the development process instead of keeping the track of what should go where. One of the productivity features of the new developer tools is automatically adding project items to Features: each time you add a new SharePoint Project Item (SPI) to your project the tools will look for a suitable Feature and will add the SPI to it. This process isn’t random and is being executed based on a number of criteria such as the scopes in which the given SPI may be deployed vs. the scope of the given Feature. This process of matching, although very useful in some scenarios, can lead to SPI’s added to wrong Features. This is especially difficult to track when working with complex solutions that consist of multiple Features and many SPI’s. Unfortunately there is no out of the box way to disable to auto adding process. However, thanks to great extensibility capabilities of the new Visual Studio 2010 SharePoint Developer Tools it is possible now. Proudly introducing: Mavention Cancel Adding SharePoint Project Items extension.

Mavention Cancel Adding SharePoint Project Items is a custom extension for the new Visual Studio 2010 SharePoint Developer Tools. This extension has no User Interface and all it does is it hooks up with the SharePoint Project events. The extension tracks the newly added SharePoint Project Items and removes them from the Feature where they were automatically added to. The extension works automatically upon installation. If you want to disable it and reset to default behavior you can either Disable or Uninstall the extension in the Extension Manager.

This is the first – beta release of the Mavention Cancel Adding SharePoint Project Items extension. The final version as well as the source code will be soon added to the Community Kit for SharePoint: Development Tools Edition (CKS:DEV) toolset.

Download: Mavention Cancel Adding SharePoint Project Items from Visual Studio Gallery (12KB, VSIX)

Technorati Tags: Visual Studio 2010

Others found also helpful: