How to install a WSP that has dependant assemblies?
I have a solution in Visual Studio 2010 that is made up of 开发者_JAVA百科3 projects.
I have one project for my SharePoint 2010 custom timer job, one project (Project A) that is used by my custom timer job, and another project (Project B) that is used by Project A.
The problem is that when I package my project the WSP only installs the Custom Timer Job to the GAC. Is there some way to have all dependant DLLs installed as well?
You have to add those DLLs (project references) manually into the WSP project's manifest. There's a UI in Visual Studio to assist you with this, no need to modify the XML directly.
Steps:
- In Solution Explorer within your WSP project locate the
Package
folder. - Double-click on
Package.package
file to open the package designer. - In the bottom of the screen click on 'Advanced'; a screen showing 'Additional Assemblies' will open.
- Click on 'Add' and select 'Add assembly from Project Output'.
- Choose the assembly and deployment mode (GAC or WebApplication = bin folder).
In this dialog you can also register the associated safe controls and resources. Also, via 'Add Existing Assembly' you can add assemblies available in binary form only (i.e. not available as VS projects in source code).
精彩评论