Связывание слияния Постполитика игнорирование привязки

У меня есть проект с SignalR и Ext.net. Оба требуют Newtonsoft.Json.

SignalR требует Newtonsoft.Json 4.5.0.0, а Ext.net - 4.0.8.0.

Мои перенаправления привязки вообще не работают. В моем web.config

<dependentAssembly>
  <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
  <bindingRedirect oldVersion="4.0.8.0" newVersion="4.5.0.0"/>
</dependentAssembly>

Но когда дело доходит до связывания

=== Pre-bind state information ===
LOG: DisplayName = Newtonsoft.Json, Version=4.0.8.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
 (Fully-specified)
LOG: Appbase = file:///C:/Users/*****/Documents/Visual Studio 2012/Projects/QuotaBuilder/branches/1Install/QMSSite/
LOG: Initial PrivatePath = C:\Users\*****\Documents\Visual Studio 2012\Projects\QuotaBuilder\branches\1Install\QMSSite\bin
Calling assembly : Ext.Net, Version=1.6.0.1867, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\*****\Documents\Visual Studio 2012\Projects\QuotaBuilder\branches\1Install\QMSSite\web.config
LOG: Using host configuration file: \\pacrl-fsrv02\userdata$\*****\My Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Newtonsoft.Json, Version=4.0.8.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/862fb004/45708817/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/862fb004/45708817/Newtonsoft.Json/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///C:/Users/*****/Documents/Visual Studio 2012/Projects/QuotaBuilder/branches/1Install/QMSSite/bin/Newtonsoft.Json.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Насколько я понимаю, ссылка на пост-политику должна быть перенаправленной версией, а не исходным запросом. Тем не менее, это полностью игнорируется. Я и раньше сталкивался с этой проблемой в этом проекте, но в прошлом мне удавалось просто получить запрашиваемую версию, потому что не было двух отдельных зависимостей.


person awptimus    schedule 23.04.2014    source источник


Ответы (2)


Измените перенаправление привязки на:

<dependentAssembly>
  <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
  <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0"/>
</dependentAssembly>
person Martin Costello    schedule 23.04.2014
comment
Это не сработало. По-прежнему игнорирует bindingRedirect, а журнал Fusion тот же - person awptimus; 23.04.2014

Не забудьте включить пространство имен XML в элемент assemblyBinding.

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
person Der_Meister    schedule 13.05.2014