臭名昭著的程序集绑定错误 [英] Infamous assembly binding error

查看:21
本文介绍了臭名昭著的程序集绑定错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的需要这方面的帮助,因为我失去了纠正问题的希望.

I really need help on this because I lost my hopes to correct the problem.

我使用的是 Office Communications Server 64 位库.我在项目中使用了 3 个 dll,Microsoft.Rtc.Collaboration.dll、Microsoft.Rtc.Internal.Media.dll 和 SIPEPS.dll.我不确定 Microsoft.Rtc.Collaboration 但 Internal.Media 和 SIPEPS 都是 x64.在 GAC 程序集列表中,Rtc.Collaboration 显示处理器架构下的 MSIL,其他显示 AMD64.

I am using Office Communications Server 64bit libraries. There are 3 dlls I use in the project, Microsoft.Rtc.Collaboration.dll, Microsoft.Rtc.Internal.Media.dll and SIPEPS.dll. I am not sure about Microsoft.Rtc.Collaboration but Internal.Media and SIPEPS are both x64. On the GAC assembly list Rtc.Collaboration shows MSIL under Processor Arhitecture and the others show AMD64.

我的项目使用这些引用编译时没有错误,但在运行时我收到错误:

My project compiles without errors with these references but at runtime I receive the error:

无法加载文件或程序集Microsoft.Rtc.Internal.Media"或其依赖项之一.试图加载格式不正确的程序.

我尝试在 CPU 设置为 Any CPU 的情况下编译项目,但没有任何变化.在 x64 和 x86 设置下,我收到此错误.

I tried compiling the project with CPU set to Any CPU but nothing changes. With both under x64 and x86 setting I receive this error.

感谢任何帮助.

更新:下面是程序集绑定日志.

UPDATE: Below is the assembly binding log.

=== Pre-bind state information ===
LOG: User = CONTOSOelodie
LOG: DisplayName = Microsoft.Rtc.Internal.Media
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Rtc.Internal.Media | Domain ID: 9
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/elodie/Documents/Visual Studio 2010/Projects/TFS/proto/Main/Source/WebBot.Web/
LOG: Initial PrivatePath = C:UserselodieDocumentsVisual Studio 2010ProjectsTFSprotoMainSourceWebBot.Webin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:UserselodieDocumentsVisual Studio 2010ProjectsTFSprotoMainSourceWebBot.Webweb.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/e3d82f59/764fa8c3/Microsoft.Rtc.Internal.Media.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/e3d82f59/764fa8c3/Microsoft.Rtc.Internal.Media/Microsoft.Rtc.Internal.Media.DLL.
LOG: Attempting download of new URL file:///C:/Users/elodie/Documents/Visual Studio 2010/Projects/TFS/proto/Main/Source/WebBot.Web/bin/Microsoft.Rtc.Internal.Media.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

推荐答案

用 32 位版本替换所有三个 dll 的 64 位版本,清理临时 ASP.NET 文件夹并再次编译.现在工作没有问题.感谢您的帮助.

Replaced the 64bit versions of all the three dlls with their 32 bit versions, cleaned Temporary ASP.NET files folder and compiled again. Now works without problems. Thanks for the help.

这篇关于臭名昭著的程序集绑定错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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