【发布时间】:2011-08-29 19:38:39
【问题描述】:
我有一个可执行文件,它的清单说它取决于
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 运行时,还有什么办法可以解决这个问题?我认为程序集的整个想法是它允许系统覆盖较旧的运行时并替换较新的运行时。
【问题讨论】:
-
我也遇到了这种情况。我比较了 Win7 和 Server 2008 R2 机器之间的 SXS 目录,它们看起来是一样的。此外,该错误似乎仅与服务器 2008 R2 无关——我在 Windows Vista、Server 2008(非 R2)、Windows 8(和 8.1)、Server 2012(和 R2)上进行了测试,这些都具有 30729 版本的 C++ 运行时,并正确重定向。只有服务器 2008 R2 有这个问题 :-(
标签: windows assemblies manifest winsxs