当版本之间存在已知问题时,为什么Windows并排(winSxS)安装自动升级策略? [英] Why does windows side by side (winSxS) install policy for auto upgrade when there are known issues between versions?

查看:113
本文介绍了当版本之间存在已知问题时,为什么Windows并排(winSxS)安装自动升级策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用MSVC 2K5 SP1(762 msvcrt80版本)编译的应用程序

We have an app compiled using MSVC 2K5, SP1 (version 762 msvcrt80)

一切都很好,直到有人在同一台计算机.Net3.0SP1上安装了它,并且安装了msvcrt80版本1433和自动升级的策略.

All is well, right up until somebody installs on the same machine .Net3.0SP1, and along with it msvcrt80 version 1433 is installed and a policy to automatically upgrade.

现在,我们到处都有随机的崩溃事件和不满意的客户.

Now we have random crashes all over the place and unhappy customers.

我了解我们可以调整清单文件以强制使用特定版本,但我发现复制自动生成的详细信息并手工修改它的方式非常丑陋.对于要修复的大量应用程序来说,这尤其令人不快

I understand we can adjust our manifest files to force the usage of a specific version, but I've only found the really ugly way of copying detail that is auto generated and modifying it by hand. This is especially unpleasant with a large number of apps to fix

我们是否可以摆脱winSxS目录中愚蠢的升级"策略? 是否有选项/标志只能针对特定版本进行编译,并且仍会自动生成清单?

Can we instead get rid of the stupid 'upgrade' policy in the winSxS directory? Is there an option/flag to compile for a specific version only and still automatically generate the manifests?

推荐答案

为您的CRT特定版本查找生成的清单.然后在您的应用程序的主文件中添加一个杂注:

Find the generated manifest for your specific version of the CRT. Then add a pragma to the main file of your application:

#pragma comment(linker,"/manifestdependency:\"type='win32' "            \
        "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "              \
        "version='" _CRT_ASSEMBLY_VERSION "' "                          \
        "processorArchitecture='x86' "                                  \
        "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")

这篇关于当版本之间存在已知问题时,为什么Windows并排(winSxS)安装自动升级策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆