将一个程序从.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):
本文由VS软件圈(vssoft.net)发布,不代表VS软件圈立场,转载联系作者并注明出处:https://vssoft.net/vsazwt/VS2010anzhuangwenti/2020/0724/2363.html