Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何将.net framework的运行时版本和sku更改为2.0?_C#_.net - Fatal编程技术网

C# 如何将.net framework的运行时版本和sku更改为2.0?

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

我的应用程序仅在.NET 2.0上运行

但是,我在部署的应用程序的App.config中有以下文本:

<?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"/>