Add an assembly into .wsp package

I have a project that needs to use Microsoft Exchange WebServices (Microsoft.Exchange.WebServices.dll). After I deployed the solution into SharePoint 2016, sometimes I receive the following error:

System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Exchange.WebServices, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

Re-deploying the solution may or may not be able to fix it.

So I opened the project in Visual Studio and double click the “Package.package”, and then go to the “Advanced” tab, and click “Add”:


Add the following info and then click “OK”:


If you go to the Manifest tab, you can see the assembly as been added:


Re-deploy the solution.

This entry was posted in SharePoint 2010, SharePoint 2016, Visual Studio 2010, Web Service. Bookmark the permalink.

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