Sharepoint "Could not load file or assembly" "The system cannot find the specified file"

I added a link to the dll (sharpPDF) in my .net project. In the code, he took the DLL, and I can use it. When I deploy sharepoint webpart, I get the following error:

Could not load file or assembly 'sharpPDF, Version=1.0.3511.18105, Culture=neutral, PublicKeyToken=f099e668beaaa0f9' or one of its dependencies. The system cannot find the file specified. 

I am deploying webapp using STSDEV. I tried to clean C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET files, but this does not solve the problem.

Any ideas what could be wrong?

+7
c # sharepoint moss wss
source share
2 answers

You need to make sure that dll sharpPDF registered in the GAC.

Go to %Windows%\assembly . If sharpPDF does not exist with version 1.0.3511.18105 , you need to install it on the GAC on the server. Just drag it to this folder in Windows Explorer and it should install itself.

+10
source share

I used this error many times, there may be a version conflict between the library that you referenced in the project links and the library that was in the GAC. Try checking the "False" value for the Copylocal property of the link, and also add the library to the project package. make sure you have the same dll version in all places. this solved my problem.

+1
source share

All Articles