0

My application runs only on .NET 2.0.

But, I had the following text in App.config in the deployed application:

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

I replaced the supportedRuntime with the following text, as my application took a long time to start:

<supportedRuntime version="v2.0" 
          sku=".NETFramework,Version=v2.0"/>

But, I am getting the following message:

enter image description here

The following picture shows that .NET 2.0 is already installed:

enter image description here

and, my .net 3.5.1 is already turned on, and there is no additional option for .net 2.0.

enter image description here

user366312
  • 16,949
  • 65
  • 235
  • 452
  • The .NET Framework 4.5 and later versions are backward-compatible with apps that were built with earlier versions of the .NET Framework – Clint May 06 '18 at 18:06
  • 4
    .NET 4.5 is [not backward-compatible](https://stackoverflow.com/questions/2548106/) with 2.0; there are breaking changes that make the same code do different things in different versions. If you want to implement .NET 2.0-behavior you must install .NET 2.0. You are opening an incredible can of hurt by using .NET 2.0. It is also extremely unlikely that using .NET 4.0 is causing your application to take “a long time to start”. If that is the problem, profile what is taking the time, do not randomly start changing runtime versions. – Dour High Arch May 06 '18 at 18:16

0 Answers0