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.


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.

| 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: trentacular.com/2009/06/… – 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.


| improve this answer | |

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.