Visual Studio Setup 项目 - 程序的.net framework升级后遇到的安装错误

将一个程序从.net framework 3.5升级至4.0后,Setup项目生成的.msi安装包运行时遇到如下错误:

 

"This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded"

 

 

修改Setup项目的属性 Version为 ".net framework 4" 即可解决:

 

 

Update: 编译安装项目时,Output窗口有如下信息:

WARNING: The version of the .NET Framework launch condition '.NET Framework 4' does not match the selected .NET Framework bootstrapper package.

 

需修改如下配置 (prerequisites从.net 3.5修改为4.0):

 

 

你可能感兴趣的:(.NET,Tips,and,Resources)