Assembly Binding Error: Bind result: hr = 0x80070002. The system cannot find the file specified

a 夏天 提交于 2019-11-30 19:23:38

PublicKeyToken=aaaaaaaaaaaaaaaa can be different or might be the version number of assembly is different. I think you should use Fusion Log Viewer to Debug as described and hope fully you will solve your problem.

So it turns out the reason the assembly could not be found was because we are Delayed Signing the Assemblies this means that:

Because the assembly does not have a valid strong name signature, the verification of that signature must be turned off. You can do this by using the –Vr option with the Strong Name tool.

I had already done this for all required public keys however ONLY in the x64 Visual Studio command prompt. I also needed to add the verification skipping for x86 in the x86 version of the Visual Studio Command Prompt.

I only managed to find this because trying a specific command based build/deployment script i noted the following exception with one of the test assemblies:

Could not load file or assembly 'ProjectC.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=e72f8d3506b83180' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

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