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=15.0.0.0, 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_assembly_1

Add the following info and then click “OK”:

add_assembly_2

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

add_assembly_3

Re-deploy the solution.

Advertisements
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:

WordPress.com Logo

You are commenting using your WordPress.com 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