Why does windows side by side (winSxS) install policy for auto upgrade when there are known issues between versions?

我怕爱的太早我们不能终老 提交于 2019-12-23 02:37:32

问题


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

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

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?


回答1:


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 "'\"")


来源:https://stackoverflow.com/questions/397196/why-does-windows-side-by-side-winsxs-install-policy-for-auto-upgrade-when-ther

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!