SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a solution package using the makecab tool that contains a feature and a DLL which will be installed on the GAC. Its getting deployed globally however I want to deploy it for specific webapplication, what is the change required.

share|improve this question
up vote 4 down vote accepted

I think there are a couple of ways to force a solution to install to a specific web app.

One way is to have the DLL deployed to the bin directory instead of to the GAC. Beware though, that all API calls will need to be cleared through Code Access Security policies written and placed in your manifest.xml.

Another is to include SafeControls which reference your DLL within the manifest.xml. This means that a web.config will have to be written to, making deployment require a web application to be specified.

share|improve this answer
thanks, +1! And just for clarity, I'd like to add: There is no such setting in your manifest.xml, which can change deployment type for your wsp. This deployment type is selected automatically, based on manifest.xml contents. If your manifest.xml does not contain any webapplication-scoped elements, such as SafeControls, it will be deployed globally. Here is a good article about this:… – Andrey Markeev May 22 '11 at 17:37
Yep, that's what I was getting at, though should've mentioned it - the contents of the manifest will dictate whether or not the wsp will be globally deployed or targeted to a specific web app. – James Love May 22 '11 at 19:10

Here are scripts to deploy to specific site collections on a web application.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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