解决framework 4.5程序部署到Windows 8和windows 8.1出现“An app on your PC needs the following Windows feature: .NET Framework 3.5 (includes .NET 2.0 and 3.0)”
在windows 7 x64上编译的.net framework 4.5程序,使用InstallShiled打包以后安装到windows 8 && 8.1后出现
因为在windows8上默认只安装有.net framework 4.0 4.5,没有使用CLR 2.0的framework 2.0 3.0 3.5,而4.x使用的全新的CLR 4.0.
根据 how-to-solve-an-app-on-your-pc-needs-the-following-windows-feature-net-framework-3-5-includes-net-2-0-and-3-0-on-windows-8这篇文章中提到相关资料,在exe.config中添加:
“An app on your PC needs the following Windows feature: .NET Framework 3.5 (includes .NET 2.0 and 3.0)”
的提示。因为在windows8上默认只安装有.net framework 4.0 4.5,没有使用CLR 2.0的framework 2.0 3.0 3.5,而4.x使用的全新的CLR 4.0.
根据 how-to-solve-an-app-on-your-pc-needs-the-following-windows-feature-net-framework-3-5-includes-net-2-0-and-3-0-on-windows-8这篇文章中提到相关资料,在exe.config中添加:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<startup uselegacyv2runtimeactivationpolicy="true"> | |
<supportedruntime version="v4.0"> | |
</supportedruntime> | |
</startup> | |
</configuration> |
Comments