Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install a WSP that has dependant assemblies?

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?

like image 281
Abe Miessler Avatar asked Mar 29 '11 19:03

Abe Miessler


People also ask

How do you make assemblies in Visual Studio?

You can normally see assembly code while debugging C++ in visual studio (and eclipse too). For this in Visual Studio put a breakpoint on code in question and when debugger hits it rigth click and find "Go To Assembly" ( or press CTRL+ALT+D )

How do I create a WSP file in SharePoint 2013?

Create a new SharePoint 2013 empty project in Microsoft Visual Studio 2013. Create a new project named "Registration" and click OK. Enter the valid SharePoint site URL and select Deploy as a Farm solution, then click Finish. Now right-click on the project and click Add new item.


1 Answers

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).

like image 61
Ondrej Tucny Avatar answered Nov 13 '22 17:11

Ondrej Tucny