在測試項目的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>
嗯,我聽說過的默認命名空間創建(從一個非常聰明的人)的問題,所以我加入了「的xmlns =」 urn:schemas-microsoft-com:asm.v1「 嘗試運行測試用例仍然沒有去 打開Fusion Log Viewer檢查問題和奇蹟,直到尋找舊的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 = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===
LOG: This is an inspection only bind.
LOG: Using application configuration file: c:\data\source\explorev1\explore.root\explore\euc.explore.domainobjectstest\bin\debug\euc.explore.domainobjectstest.dll.config
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///c:/data/source/explorev1/explore.root/explore/euc.explore.domainobjectstest/bin/debug/Msdcc.Common.DLL.
LOG: Assembly download was successful. Attempting setup of file: c:\data\source\explorev1\explore.root\explore\euc.explore.domainobjectstest\bin\debug\Msdcc.Common.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Msdcc.Common, Version=2.4.0.0, Culture=neutral, PublicKeyToken=9d9c15280f7f1425
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
我雖然過程
這讓我思考爲何仍不能做組裝重定向如果該鏈接存在於我的配置文件。
所以新手,我是我只是決定我會做什麼老人告訴我做,並從配置元素中刪除名稱空間聲明,嘿presto它的工作。的xmlns =「http://schemas.microsoft.com/.NetConfiguration/v2.0」
這個很長的故事後,我問題是從我瞭解的命名空間聲明只應該亂用智能感知爲什麼它與組裝綁定?
你用什麼VS? – 2010-07-28 17:38:02
抱歉Lukas真的很晚回覆是使用vs2008 SP1。 – 2010-08-13 17:41:08
您是否找到針對此問題的任何解決方案...? – Syska 2014-01-18 12:30:41