Add External DLL with SharePoint WSP to GAC

In this blog, I will explain how you can refer external dll in your SharePoint solution to make it work wherever this dll is not there in the Global Assembly Cache. So the solution itself must contain the dll. To add dll into your SharePoint solution below are the steps:

  1. Reference the dll in the Solution references first.
  1. Now add the dll into your solution by selecting the dll. Once you add it, it will appear in the References list. But it will not be added to the package of Solution, which we have to manually do that.
  1. Open package file
  1. Open Advanced Click Add > Add Existing Assembly
  1. Select dll source path. Now click OK. Make sure Deployment Target is

Once you are done with above steps. Now verify that WSP is containing that dll.

In my case I have renamed it from EmbedExternalDLLs.wsp file  to and extract it to the folder. In that folder you will find that added dll.