我有一个可执行文件,它的清单说它取决于
Microsoft.VC90.CRT 9.0.21022.8
Microsoft.VC90.CRT 9.0.30729.1
在 Windows 7 上,此可执行文件可以正常运行。在 Windows Server 2008 R2 上,此可执行文件无法运行并显示以下消息:
应用程序无法启动,因为它的并排配置不正确。请查看应用程序事件日志或使用命令行 sxstrace.exe 工具了解更多详细信息。
这是出乎意料的——我认为 Windows 7 和 Windows Server 2008 R2 在运行时可用性方面应该非常相似。两台机器都很干净。Windows 7 机器是全新安装的,上面没有任何内容。Windows Server 2008 R2 机器只有一些来自 Windows Update 的更新。
我检查了 Windows 7 机器的 WinSxS 目录,发现
Microsoft VC90.CRT 9.0.30729.4926
我检查了 Windows Server 2008 R2 机器的 WinSxS 目录,发现
Microsoft VC90.CRT 9.0.30729.4926
存在的运行时比清单中指定的更新,但 Windows Server 2008 R2 系统无法重定向到更新的运行时。在 Windows Server 2008 R2 上运行 sxstrace 显示:
INFO: Applying Binding Policy
INFO: No publisher policy found.
INFO: No binding policy redirect found.
在 Windows 7 上运行 sxstrace 会给出:
INFO: Applying Binding Policy
INFO: Find publisher policy at C:\Windows\WinSxS\manifest\amd64...
INFO: Publisher Policy redirected assembly version.
INFO: Post policy assembly identity is...
除了安装 VS 2008 运行时和 VS 2008 SP1 运行时之外,有什么想法可以解决这个问题吗?我认为程序集的整个想法是它允许系统覆盖较旧的运行时并替换较新的运行时。