Sunday, September 25, 2011

Disable automatic activation of SharePoint features in Visual Studio 2010.

When we write our custom solutions for SharePoint 2010, we must know that all our features will be activated automatically on every time we deploy the solution over the SharePoint site selected at project creation time.



This is the default configuration that we have inside SharePoint 2010 tools for Visual Studio 2010. When you are doing development of a custom event receiver that manage activation or deactivation events of a SharePoint feature. In this specific sample, we cannot debug our code.

To solve this problem, you can modify this configuration and select to don't activate your features every time you have to deploy your solution. To do this, simply you have to open the project properties page through the "Solution explorer" toolbox, select the "SharePoint" tab and choose the configuration named "No Activation".
 

As we can disable the automatic activation of our features, we also have the possibility to create custom configurations in which we can insert deploy and retract operations, app-pool recycles, features activation and command execution of pre/post deploy actions.

2 comments:

  1. Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.

    ReplyDelete
  2. Unfortunatly, the pictures don't load anymore :(

    ReplyDelete