Could not load file or assembly or one of its dependencies – Issue in SharePoint Farm solution

Ahamed Fazil Buhari
 
Senior Developer
February 28, 2018
 
Rate this article
 
Views
5477

Hello everyone,

In this article we will see how to resolve the following issue which happens when you refer third party dll in your SharePoint farm solution. Here in my solution I use Aspose.Words third party dll which is used to deal with word documents in .NET and used to convert word to other formats like PDF. After deploying your solution in SharePoint, to debug – add w3wp.exe in Attach Process window (Ctrl + Alt + P in VS) and while debugging I came across the below issue.

 

image

To avoid this error, go Package.package in your solution as show below

 

image

 

In Package.package window, go to Advanced tab and give source path to your dll and click on OK.

 

image

 

Now the “Could not load file or assembly Aspose.Words,” issue has been resolved. Like this you can refer your dll in the package and avoid this error when you refer some third party dll.

I hope this article is helpful for you. Thank you for reading.

Happy Coding

Ahamed

Author Info

Ahamed Fazil Buhari
 
Senior Developer
 
Rate this article
 
Ahamed is a Senior Developer and he has very good experience in the field of Microsoft Technologies, especially SharePoint, Azure, M365, SPFx, .NET and client side scripting - JavaScript, TypeScript, ...read more
 

Leave a comment