Question

I have a SharePoint 2010 project in a solution, and I have a library project in the solution. In the SharePoint project I've referenced to that project.

Now when I deploy the SharePoint project, my custom library is not being deployed. I checked the GAC and it isn't in there, so I get an error from SharePoint that he cannot load this library etc.

At the references for library I have CopyLocal set to true etc. So how do I deploy this library to GAC?

Second question, can I deploy the library seperatly from deploying SharePoint project? And how to do it?

Was it helpful?

Solution

So, when you reference a dll created in a different project and reference it in your SP project, you need to add it to the Package.

To make Visual Studio adding 3rd party assembly or even your own assembly from other project in solution to GAC please do next:

Open Package.package from Package folder in SharePoint project.

Click Advanced in bottom area.

Click Add and chose which type of assembly you want to add.

In dialog select dll file, chec GAC or BIN, add safe controls and class resources entries if required. Click Ok.

Your assembly will be packaged to WSP, defined in manifest and deployed everytime.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top