在windows下发现,如果你的程序中含有setup、install或者uninstall等单词。当前这个程序退出以后,系统会弹窗其实兼容性问题,说这个程序是否正确安装。解决方法如下:
1、分离manifest文件。
2、重新构建工程。此时在exe输出目录下会生成manifest文件。
3、编辑manifest文件。在
加入根节点assembly下加入以下信息:
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{3