У меня есть приложение, использующее версию 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 ЭЛТ, в папку моего приложения (т. Е. Развертывание сборок как частных сборок). Кажется, что это признается в конце, где sxstrace говорит:
INFO: Manifest found at F:\Temp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
Увы, почему-то этого не видно, когда разрешена ссылка на версию 762. Как заставить ссылку на версию 762 указать на версию 5592, которая распространяется с моим приложением?
Я ошибаюсь, в чем проблема?
Спасибо за вашу помощь!