C# 如何将.net framework的运行时版本和sku更改为2.0?
我的应用程序仅在.NET 2.0上运行 但是,我在部署的应用程序的App.config中有以下文本:C# 如何将.net framework的运行时版本和sku更改为2.0?,c#,.net,C#,.net,我的应用程序仅在.NET 2.0上运行 但是,我在部署的应用程序的App.config中有以下文本: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="assemblies" type="Simple.Framework.AssembliesConfigurationSection, Simple.Fra
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="assemblies"
type="Simple.Framework.AssembliesConfigurationSection, Simple.Framework"/>
</configSections>
<connectionStrings>
<add name="SystemSqlServer"
connectionString="Data Source=.\sqlexpress;Initial Catalog=gre;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0"
sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>
但是,我得到了以下信息:
下图显示已安装.NET 2.0:
而且,my.NET3.5.1已经打开,并且.NET2.0没有其他选项
.NET Framework 4.5及更高版本与使用早期版本的.NET Framework构建的应用程序向后兼容。NET 4.5与2.0兼容;有一些突破性的更改使得相同的代码在不同的版本中执行不同的操作。如果要实现.NET 2.0-behavior,必须安装.NET 2.0。通过使用.NET2.0,您打开了一个令人难以置信的伤害罐。使用.NET 4.0也极不可能导致应用程序“长时间启动”。如果这就是问题所在,请分析需要花费的时间,不要随意开始更改运行时版本。
<supportedRuntime version="v2.0"
sku=".NETFramework,Version=v2.0"/>