![](/img/trans.png)
[英]Could not load file or assembly “*.dll” , The system cannot find the file specified
[英]Sharepoint “Could not load file or assembly” “The system cannot find the file specified”
我在我的.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.
我正在使用STSDEV部署webapp。 我已經嘗試清除C:\\ Windows \\ Microsoft.NET \\ Framework \\ v2.0.50727 \\ Temporary ASP.NET Files但這不能解決問題。
什么想法可能會出錯?
您需要確保sharpPDF
dll已在GAC中注冊。
轉到%Windows%\\assembly
。 如果sharpPDF
不存在與版本1.0.3511.18105
,你需要在服務器上安裝到GAC。 只需將其拖到Windows資源管理器中的該文件夾中,它就應該自行安裝。
我曾多次遇到此錯誤,您在項目引用中引用的庫與GAC中的庫之間可能存在版本沖突。 嘗試檢查引用的Copylocal屬性的“False”,並將庫添加到項目包中。 確保在所有地方都有相同版本的dll。 這解決了我的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.