How to install a WSP that has dependant assemblies

2019-04-09 08:14发布

I have a solution in Visual Studio 2010 that is made up of 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?

1条回答
不美不萌又怎样
2楼-- · 2019-04-09 08:38

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:

  1. In Solution Explorer within your WSP project locate the Package folder.
  2. Double-click on Package.package file to open the package designer.
  3. In the bottom of the screen click on 'Advanced'; a screen showing 'Additional Assemblies' will open.
  4. Click on 'Add' and select 'Add assembly from Project Output'.
  5. 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).

查看更多
登录 后发表回答