[英]How to Change .NET Version Target
I am creating a service which was originally targeting .NET 4.5
. 我正在创建最初面向
.NET 4.5
。
I changed this to .NET 3.5
in the Project Properties: 我在项目属性中将其更改为
.NET 3.5
:
I also updated all of the .resx
files to contain Version=2.0.0.0
instead of Version=4.0.0.0
(as the compiler was complaining about this), and I also removed .NET 4.5
from the list of prerequisites. 我还更新了所有
.resx
文件,使其包含Version=2.0.0.0
而不是Version=4.0.0.0
(因为编译器对此有所抱怨),并且我还从必备组件列表中删除了.NET 4.5
。
However, when I generate a new MSI and try to run I am seeing this message: 但是,当我生成一个新的MSI并尝试运行时,我看到此消息:
This setup requires the .NET Framework version 4.5.
此设置需要.NET Framework 4.5版。 Please install the .NET Framework and run this setup again.
请安装.NET Framework,然后再次运行此安装程序。 The .NET Framework can be obtained from the web.
可以从Web获得.NET Framework。 Would you like to do this now?
您现在要这样做吗?
The machine I am trying to install this on has .NET 3.5
installed and so this should run without issue. 我尝试在其上安装此机器的计算机已安装
.NET 3.5
,因此它应该可以正常运行。
I am not sure what else to check in my project - does anyone have any ideas of what might be causing this? 我不确定我的项目中还要检查什么-有人对导致这种情况的原因有任何想法吗? Is there some way of "refreshing" the settings to ensure that the new framework is used by the installer?
是否有某种“刷新”设置以确保安装程序使用新框架的方法?
Change Target Framework in Project Properties and Recompile. 在项目属性中更改目标框架并重新编译。 That's all...
就这样...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.