I have two site collections, SC1 and SC2. They both have the same solution deployed on them. The solution was deployed on both via Visual Studio's "Deploy" functionality, changing the the deployment URL.

The solution itself contains a couple of content types, custom lists, event receivers and a workflow.

When I make changes to the solution, for example add a new column to a content type or to a custom list, and deploy it again to SC2 (via Visual Studio) I see those changes in SC1 as well, even though I haven't deployed to SC1.

I have the scope of the feature set to "Web" in Visual Studio.

What's going on here?


What is going on is that Visual Studio deploys your solution globally and your feature is being activated on all webs. This is how it works.

First of all set the project property of "Active Deployment" to "No Activation". Deploy the solution. Then activate/reactivate the feature on a specific web. The C# code, though, will be deployed to GAC or WebApp and you won't be able to have different versions of that.

Hope this helps.

  • Would I see this behaviour if I exported the solution as a WSP and deployed and activated it to the appropriate web via the SharePoint GUI? I'm guessing (and I hope) not. When you say "globally" do you mean it is deployed to all site collections in the WebApp? If I deployed to a site collection in a different WebApp would I still see this behaviour? – Submits Mar 3 '15 at 10:50
  • I am afraid it's going to be the same. What you trying to achieve? Have two instances of the same feature definition? I am afraid this is not how SharePoint works. If you want different funcionality, add another feature. What I meant by globally is that all code is deployed to GAC (globally) or web application, so even if you work around the way I suggested (have different versions of the same feature activated in different webs), the feature receiver code will still be identical even if "No Activation" mode is selected. – Paul Strupeikis Mar 3 '15 at 11:41
  • Basically I wanted to have a site collection where I conduct my development and another site collection where I have users test my solutions and give me feedback. But I only want updates to my solution deployed to the development site collection until I decide it's ready for the test site collection. Any way to achieve this? – Submits Mar 3 '15 at 11:43
  • I should add that our production environment is completely separate. – Submits Mar 3 '15 at 11:43
  • 1
    I am afraid there is no easy or straight forward way to do it. All the ways are based on work-arounds and I wouldn't recommend them. The best bet for you would be separating the features - one for development and another for user testing. In that case when you update one, the other one will not get updated. The con is that there will be a lot of duplicate code, xml etc. – Paul Strupeikis Mar 3 '15 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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