Creating a solution that deploys to selected WebApplications but copies the assembly to GAC

后端 未结 4 2011
抹茶落季
抹茶落季 2021-01-06 09:23

Using VisualStudio 2010 to create a SharePoint2010 solution, I want to deploy my solution to selected WebApplications (not to all). I can do this, by switching Assembly Depl

4条回答
  •  盖世英雄少女心
    2021-01-06 09:57

    I am not quite sure what your end goals are but you may want to keep following in mind:

    When you set Assembly Target to Web Application, the compiled assembly (.dl) will be deployed to the Bin folder of the web application instead of GAC

    The web application to which VS.Net deploys the SOLUTION (.wsp) is determined by “Site Url” property of the project.

    Unless you are creating Sandboxed solution, the features that you deploy on server are available to all web applications irrespective of web application that you deployed the WSP to. Sometimes, You may still want to deploy the WSP to specific web application because the WSP may do following depending on the content of your WSP. For example, it may deploy assemblies to the bin folder of web application, it may copy .resx files to the folders of your web application, it may modify web.config to insert entries required by the functionality of your features etc.

    If you want to deploy the WSP to more than one web application, there are several options, to name a few: using post build command of VS.Net, using central administration, using STAADM or using Powershell.

    If you are using SharePoint 2010, you have a choice to deploy a solution strictly to single site collection which does not affect other site collections in the same web application or in other site collections in other web applications. These are called "Sandboxed Solutions". They are perfect fit for hosting scenariors where you have multiple customers sharing the the same farm. Definately, one of the biggest enhancement of SharePoint 2010. Again, they belong to Site Collections not to a Web application (which can have more than one site collections). there are some limitations though (for good reason) when it comes to Sandboxed Solutions. More information? See links below:

    http://msdn.microsoft.com/en-us/magazine/ee335711.aspx

    http://technet.microsoft.com/en-us/library/ee721992.aspx (includes the limitations)

    http://msdn.microsoft.com/en-us/sharepoint/ee513156.aspx (Video Training)

提交回复
热议问题