У меня есть приложение, использующее CRT версии 8.0.50727.5592. Одна из зависимых библиотек использует версию 8.0.50727.762. Когда я запускаю приложение на машине с установленной версией 8.0.50727.4940, я получаю сообщение об ошибке «параллельная конфигурация неверна». Используя sxstrace, я получаю следующий результат:
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = AMD64
CultureFallBacks = en-US;en
ManifestPath = F:\Temp\Temp.exe
AssemblyDirectory = F:\Temp\
Application Config File = F:\Temp\Temp.exe.Config
-----------------
INFO: Parsing Application Config File F:\Temp\Temp.exe.Config.
INFO: Parsing Manifest File F:\Temp\Temp.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762"
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.5592"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
INFO: Resolving reference for ProcessorArchitecture amd64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\Windows\WinSxS\manifests\amd64_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_09c03a53facd313f.manifest
INFO: Publisher Policy redirected assembly version.
INFO: Post policy assembly identity is Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4940".
INFO: Begin assembly probing.
INFO: Attempt to probe manifest at C:\Windows\WinSxS\manifests\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_88df89932faf0bf6.manifest.
INFO: Manifest found at C:\Windows\WinSxS\manifests\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_88df89932faf0bf6.manifest.
INFO: End assembly probing.
INFO: Resolving reference Microsoft.VC80.CRT.mui,language="*",processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4940".
INFO: Resolving reference for ProcessorArchitecture amd64.
INFO: Resolving reference for culture en-US.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_64\Microsoft.VC80.CRT.mui\8.0.50727.4940_en-US_1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.mui.DLL.
INFO: Did not find manifest for culture en-US.
INFO: End assembly probing.
INFO: Resolving reference for culture en.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_64\Microsoft.VC80.CRT.mui\8.0.50727.4940_en_1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.mui.DLL.
INFO: Did not find manifest for culture en.
INFO: End assembly probing.
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.5592".
INFO: Resolving reference for ProcessorArchitecture amd64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_64\Microsoft.VC80.CRT\8.0.50727.5592__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at F:\Temp\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at F:\Temp\Microsoft.VC80.CRT.MANIFEST.
INFO: Attempt to probe manifest at F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
INFO: Manifest found at F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
INFO: End assembly probing.
ERROR: Two assemblies have the same assembly name with different version. Assembly 1: F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST. Assembly 2: INFO: Manifest found at F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST..
ERROR: Activation Context generation failed.
End Activation Context Generation.
Мне кажется, что зависимость от версии 762 "апгрейдится" до версии 4940, тогда как зависимость от 5592 явно быть не может.
Я скопировал папку «Microsoft.VC80.CRT», содержащую версию 5592 CRT, в папку моего приложения (т. е. развернул сборки как частные сборки). Кажется, распознается в конце, где sxstrace говорит:
INFO: Manifest found at F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
Увы, почему-то этого не видно при разрешении ссылки на версию 762. Как заставить ссылку на версию 762 указывать на версию 5592, которая распространяется с моим приложением?
Я ошибаюсь в том, что я думаю, что проблема?
Спасибо за вашу помощь!