小编Dav*_*ier的帖子

绑定重定向不在测试项目中工作

在测试项目的app.config中应用绑定重定向时.运行时拒绝遵循重定向命令并继续搜索旧版本的程序集

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Msdcc.Common" publicKeyToken="9d9c15280f7f1425"/>
      <bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>
Run Code Online (Sandbox Code Playgroud)

好吧,我听说过默认的命名空间创建问题(来自一个非常聪明的人)所以我添加了"xmlns ="urn:schemas-microsoft-com:asm.v1".试过运行测试用例仍然没有去.打开Fusion日志查看器检查了问题和想知道它是奇怪的,直到寻找旧的DLL.下面给出的真正有用的消息是使用这篇文章解密 http://msdn.microsoft.com/en-us/magazine/dd727509.aspx

*** Assembly Binder Log Entry  (28/07/2010 @ 18:59:36) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from:  C:\WINNT\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable  C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = BELGACOM\id820374
LOG: DisplayName = Msdcc.Common, Version=2.2.0.0, Culture=neutral, PublicKeyToken=9d9c15280f7f1425
 (Fully-specified)
LOG: Appbase = file:///c:/data/source/explorev1/explore.root/explore/euc.explore.domainobjectstest/bin/debug
LOG: Initial PrivatePath …
Run Code Online (Sandbox Code Playgroud)

c# binding assemblies

6
推荐指数
1
解决办法
2618
查看次数

标签 统计

assemblies ×1

binding ×1

c# ×1