FileNotFoundException thrown for a referenced assembly

陌路散爱 提交于 2019-12-06 03:02:17

问题


I'm getting a really weird FileNotFoundException thrown the first time I try to use a class defined in an assembly I have referenced. The assembly hasn't changed, and the location in the project file corresponds correctly to the physical path on disk.

This suddenly started failing in a solution that consists of two library projects, a windows service project and a console application, when I added installers to the windows service and a setup project. However, I have the console app as a single startup object, there are no references in either way between the console application and the service/installer projects.


回答1:


If you enable Assembly Binding Logging, you will find that the FileNotFoundException will contain within it the complete fusion probing log for the missing file. Normally this makes the problem pretty obvious straight away.

See http://msdn.microsoft.com/en-us/library/e74a18c4(VS.80).aspx



来源:https://stackoverflow.com/questions/3238266/filenotfoundexception-thrown-for-a-referenced-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!