下面来看看关于win7下manifest配置文件:发现只要注释掉supportedOS就可以了。
<?xml version="1.0"encoding="utf-8"?><asmv1:assembly manifestVersion="1.0"xmlns="urn:schemas-microsoft-com:asm.v1"xmlns:asmv1="urn:schemas-microsoft-com:asm.v1"xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <assemblyIdentityversion="1.0.0.0" name="MyApplication.app"/> <trustInfoxmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivilegesxmlns="urn:schemas-microsoft-com:asm.v3"> <!-- UAC 清单选项 如果要更改Windows 用户帐户控制级别,请用以下节点之一替换 requestedExecutionLevel 节点。
<requestedExecutionLevellevel="asInvoker" uiAccess="false"/> <requestedExecutionLevellevel="requireAdministrator" uiAccess="false"/> <requestedExecutionLevellevel="highestAvailable" uiAccess="false"/>
指定requestedExecutionLevel 节点将会禁用文件和注册表虚拟化。 如果要利用文件和注册表虚拟化实现向后 兼容性,则删除requestedExecutionLevel 节点。 --> <requestedExecutionLevellevel="requireAdministrator" uiAccess="false"/> </requestedPrivileges> </security></trustInfo>

<compatibilityxmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!-- 此应用程序设计使用的所有 Windows 版本的列表。Windows将会自动选择最兼容的环境。-->
<!-- 如果应用程序设计使用 Windows 7,请取消注释以下 supportedOS节点--> <supportedOSId="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application></compatibility>
<!-- 启用 Windows公共控件和对话框的主题(Windows XP 和更高版本) --><dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly></dependency>
</asmv1:assembly>