Adding an external DLL/assembly in Visual Studio 2010 SharePoint Project

I wanted to consume a few dll’s and wanted them to be deployed to GAC and was thinking if Visual Studio 2010 has this feature for deploying external dll’s from the same Visual Studio SharePoint project.


Go to Package explorer and double click on the package

Click on the Advanced Tab on the bottom of the package


Now click on Add button and out of the 2 options—> select “Add from Existing Assembly”



Kool this has options to add to GAC/Webapplication and rest VS 2010 takes care of it…



Tags: , , , ,

4 Comments on “Adding an external DLL/assembly in Visual Studio 2010 SharePoint Project”

  1. Peter July 27, 2011 at 7:37 am #

    I just followed your example and the same Error: “Assembly has no strong name” still pops up.

    I want to use Twitterizer for posting from a WPF-Form Status-Updates. Since Twitterizer has an external dll which you need to include i added it to the package via advanced mode.. same Error still occurs..

    Any Idea?

    • atulchhoda July 27, 2011 at 11:26 am #

      For GAC deployment you need the assembly to be signed, so in your case best bet would be to deploy to the webapplication instead of GAC. you have options for the external DLL to be deployed either to GAC or WebApplication. the dll gets copied in the bin folder of the WebApplication

  2. Manikandan April 9, 2012 at 1:51 am #

    I have a dll, which is not signed. am trying to use this in my webpart from WebApplication bin folder (C:\inetpub\wwwroot\wss\VirtualDirectories\2020\bin). but it shows error “Assembly generation failed– Referenced assembly ‘customdll’ does not have a strong name” .

    So I tried in another way, where i have uncheck the sign the assembly checkbox from the project properties. Then it was builded successfully. But while deploying it shows error “Value cannot be null. Parameter name: PublicKey”

    Could you pls help me to use the dll from webapplication bin foder.

  3. Manikandan April 9, 2012 at 1:54 am #

    Also have another doubt, should the external dll has strong name to use in sharepoint2010 webpart ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: