大会绑定错误:绑定的结果:HR = 0x80070002。该系统找不到指定的文件 [英] Assembly Binding Error: Bind result: hr = 0x80070002. The system cannot find the file specified

查看:2478
本文介绍了大会绑定错误:绑定的结果:HR = 0x80070002。该系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Visual Studio 2010解决方案包含一个类库(项目A)和两个SharePoint项目(项目B&安培;项目C)。相关性顺序是项目B引用ProejctA和项目C引用了两个项目A&放大器; 。项目B

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

在一个特定的开发机,我得到试图建立项目C时,出现以下错误:

On one particular development machine i get the following error when trying to build ProjectC:

编译失败。无法加载所请求的类型的一个或多个。 。获取更多信息,LoaderExceptions财产

Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

当寻找到融合的日志我注意到了以下错误:

When looking into the fusion log i noted the following error:

*大会粘结剂日志条目(14/06/2012 @ 9点38分32秒)*

操作失败

绑定结果:HR = 0x80070002。该系统找不到指定的文件

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

大会经理:C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr。 DLL

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll

下运行可执行C:\Program文件(x86)\Microsoft的Visual Studio 10.0\Common7\IDE\devenv.exe

Running under executable C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

---详细的错误日志如下。

--- A detailed error log follows.

===预绑定状态信息===
日志:用户= DOMAIN\username

=== Pre-bind state information === LOG: User = DOMAIN\username

日志:显示名称=项目b,版本= 0.0.0.0,文化=中性公钥= aaaaaaaaaaaaaaaa,的ProcessorArchitecture = MSIL
(完全指定)

LOG: DisplayName = ProjectB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa, processorArchitecture=MSIL (Fully-specified)

日志:应用平台=文件:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE /

LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/

LOG:初始PrivatePath = NULL

LOG: Initial PrivatePath = NULL

日志:动态基= NULL

LOG: Dynamic Base = NULL

日志:缓存基= NULL

LOG: Cache Base = NULL

日志:AppName的= devenv.exe的

LOG: AppName = devenv.exe

调用汇编:(未知)

LOG :此绑定启动默认加载上下文

LOG: This bind starts in default load context.

日志:使用应用程序配置文件:C:\Program文件(x86)\Microsoft的Visual Studio 10.0\Common7\\ \\IDE\devenv.exe.Config

LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.Config

日志:使用主机配置文件:

LOG: Using host configuration file:

LOG:使用机配置文件从C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

日志:后政策参考:项目b,版本= 0.0.0.0,文化=中性公钥= aaaaaaaaaaaaaaaa,的ProcessorArchitecture = MSIL

LOG: Post-policy reference: ProjectB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa, processorArchitecture=MSIL

LOG:GAC查找不成功

LOG: GAC Lookup was unsuccessful.

LOG:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE /项目B / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PublicAssemblies / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PublicAssemblies /项目B / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies /项目B / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/ TemplateProviders / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/ TemplateProviders /项目B / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors /项目B / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors / 86 / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors / 86 /项目B / ProjectB.DLL。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/编辑/ ProjectB.DLL。
日志:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/编辑/项目B / ProjectB.DLL新的URL文件的尝试下载。
日志:新的URL文件试图下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /平台/调试器/ ProjectB.DLL。
日志:新的URL文件试图下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /平台/调试/项目B / ProjectB.DLL。
日志:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / ProjectB.EXE新的URL文件的尝试下载。
日志:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE /项目B / ProjectB.EXE新的URL文件的尝试下载。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PublicAssemblies / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PublicAssemblies /项目B / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies /项目B / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/ TemplateProviders / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/ TemplateProviders /项目B / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors /项目B / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors / 86 / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / PrivateAssemblies / DataCollectors / 86 /项目B / ProjectB.EXE。
日志:尝试新的URL文件下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/编辑/ ProjectB.EXE。
日志:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /微软/编辑/项目B / ProjectB.EXE新的URL文件的尝试下载。
日志:新的URL文件试图下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /平台/调试器/ ProjectB.EXE。
日志:新的URL文件试图下载:/// C:/ Program Files文件(86)/微软的Visual Studio 10.0 / Common7 / IDE / CommonExtensions /平台/调试/项目B / ProjectB.EXE。
日志:所有探测网址企图失败

LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB/ProjectB.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Microsoft/Editor/ProjectB/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/CommonExtensions/Platform/Debugger/ProjectB/ProjectB.EXE. LOG: All probing URLs attempted and failed.

我曾尝试:


  1. 删除参考项目b,并重新添加它既:

    • A)作为项目引用

    • b)作为直接手动参考项目b的debug文件夹

而只有(2)将在GAC大会允许项目C兴建。
为什么没有找到大会,因为它应该(而且确实在其他机器上)?

And only (2) placing the assembly in the GAC allows ProjectC to build. Why is it not finding the assembly as it should (and does on other machines)?

推荐答案

因此,原来其中的原因,大会未能找到,是因为我们是延迟签名大会这意味着:

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

由于该组件没有一个有效的强名称签名,该签名的验证必须关闭。您可以通过使用强名称工具的-Vr选项做到这一点。

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.

我已经做不过这为所有需要的公共密钥只有在64位的Visual Studio命令提示符。我还需要添加验证跳过针对x86在Visual Studio命令提示符的x86版本。

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:

无法加载文件或程序集ProjectC.Tests,版本= 0.0 .0.0,
区域性=中性公钥= e72f8d3506b83180'或其
依赖关系之一。强名称验证失败。 (异常来自HRESULT:
0x8013141A)

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)

这篇关于大会绑定错误:绑定的结果:HR = 0x80070002。该系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆