2014-11-24 130 views
0

我收到此錯誤: 無法加載文件或程序集,系統找不到指定的文件。無法加載文件或程序集,系統找不到指定的文件

圖片:

http://s30.postimg.org/4x936f6ch/error2.png

http://s17.postimg.org/41ta9aaj3/errro3.png

我有一個解決方案構建在.NET 4.0中 在這裏面我有作爲插件項目。他們使用dll,問題在於解決方案項目dll中的一個被調用,並且引用導致問題的dll。 只有當程序到達使用引用該DLL的dll的部分時,我纔會得到重建等錯誤信息。

我也確保在項目的bin文件夾中有它抱怨的dll。

我已經在反射器中打開了dll,我認爲它沒有任何問題。 有人指出我下一步嘗試解決這個問題嗎?

謝謝!

回答

0

一些祕訣 - 很難知道它們是否會幫助你:

  1. Open the csproj file(s) in a text editor and see where the dlls are being referenced (GAC possibly)
  2. If it's a signed assembly, make sure you've got a signed copy (if you've built an Open Source project yourself the signing will be lost)
  3. Look at the references in Visual Studio - do you have Copy Local set to True and Specific Version set to False?
  4. Look at you're App.config or Web.config - is there a binding redirect that failing to load
  5. I remember reading a post about assemblies not being able to be unloaded - probably not an issue on this one but I think the trick was to load the DLL in a separate AppDomain to keep it isolated - loadable and unloadable.
相關問題