我真的需要这方面的帮助,因为我失去了解决问题的希望。
我正在使用 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。
我的项目使用这些引用编译时没有错误,但在运行时我收到错误:
无法加载文件或程序集“Microsoft.Rtc.Internal.Media”或其依赖项之一。尝试加载格式不正确的程序。
我尝试将 CPU 设置为“任何 CPU”来编译项目,但没有任何变化。在 x64 和 x86 设置下,我收到此错误。
感谢任何帮助。
更新:下面是程序集绑定(bind)日志。
=== Pre-bind state information ===
LOG: User = CONTOSO\elodie
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:\Users\elodie\Documents\Visual Studio 2010\Projects\TFS\proto\Main\Source\WebBot.Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\elodie\Documents\Visual Studio 2010\Projects\TFS\proto\Main\Source\WebBot.Web\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.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.
最佳答案
就我而言,我遇到这个问题是因为我正在运行一个使用 IISExpress 为 x64 编译的 Web 项目。我通过检查 Visual Studio 中的以下设置解决了该问题:
工具|选项|项目和解决方案|网络项目|使用 64 位版本的 IIS Express
希望这可以帮助其他遇到相同情况和问题的人
关于visual-studio-2010 - 臭名昭著的程序集绑定(bind)错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3745612/