Sharepoint"无法加载文件或程序集""系统找不到指定的文件"

Joh*_*ohn 8 c# sharepoint moss wss

我在我的.net项目中添加了对dll(sharpPDF)的引用.在代码中,它已经拿起了dll,我可以使用它.当我通过sharepoint webpart部署时,我收到以下错误:

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. 
Run Code Online (Sandbox Code Playgroud)

我正在使用STSDEV部署webapp.我已经尝试清除C:\ Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files但这不能解决问题.

什么想法可能会出错?

Eri*_*ric 11

您需要确保sharpPDFdll已在GAC中注册.

去吧%Windows%\assembly.如果sharpPDF没有版本1.0.3511.18105,则需要将其安装到服务器上的GAC.只需将其拖到Windows资源管理器中的该文件夹中,它就应该自行安装.

  • 将dll放入GAC后,您还需要执行IISRESET. (7认同)
  • ...或者使用`gacutil -i(这里是你的程序集).dll`(来自Visual Studio命令提示符) (2认同)