I have written c# console app. .NET Framework is by default set to version 4.5. I want to know if there is a way, to test app with older versions of .NET framework or test, which version of framework app actually needs to run( without regarding targettype framework).
The version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full.
A cross-platform and open-source framework, . NET Core is best when developing applications on any platform. . NET Core is used for cloud applications or refactoring large enterprise applications into microservices. You should use .
Whether you need any of them or not depends on what you're running. Most applications out there are still built for . NET 2 to 3.5 so installing 3.5 will cover you for that. I would recommend installing 4 as looking forwards that's what Microsoft want people to be using.
You need to install the . NET Framework to run many apps on Windows. The best versions to install are the latest one and the . NET Framework 3.5 SP1.
You can add some entries to your app.config file to target a particular version of the framework, to override the version that it was built with. Obviously you still need to test that it works with these versions but this allows you to run on different versions of the framework:
<configuration>
<!-- this is used if they only have net 4 installed-->
<!--
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>
-->
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0.30319"/>
</startup>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With