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

前端 未结 2 997
感情败类
感情败类 2021-01-04 22:53

I have a Visual Studio 2010 solution that contains a class library (ProjectA) and two Sharepoint projects (ProjectB & ProjectC). The dependency order is ProjectB referen

相关标签:
2条回答
  • 2021-01-04 23:28

    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)

    0 讨论(0)
  • 2021-01-04 23:42

    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.

    0 讨论(0)
提交回复
热议问题