Is the .NET Framework 4.0 intaller also installed by .NET 3.5?

.NET 4.0 is designed to work with 3.5 at the same time and will not run 3.5 applications, which makes me worry about getting my users to download .NET 3.5 instead of the “latest version”.

I read on the blog that installer 4.0 will install 3.5 if it is not already installed, but I can’t check it right now, did anyone try this or get a response from a reliable source?

+4
source share
2 answers

I was able to test it only in the .NET 4.0 window and it won’t run outside the box (could not find the version error at runtime), but your answer made me look for these configuration files, and I found a way to make it work on 3.5, when it is available, but back to 4.0. This is the code if someone else has a problem:

<?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="false"> <supportedRuntime version="v2.0.50727" /> <supportedRuntime version="v4.0" /> </startup> </configuration> 
+1
source

Not. The .NET 4.0 installer will only install version 4. It will run CLR version 2-oriented applications (for example, 3.5 applications) if there is no other version of the installed platform. Of course, you should check this scenario to make sure that version 4 changes do not have unexpected side effects. Do this by creating or editing the .exe.config file for your application:

 <configuration> <startup> <supportedRuntime version="v4.0.30319"/> </startup> </configuration> 

Please note that you cannot use the VS2008 debugger when you do this.

+5
source

Source: https://habr.com/ru/post/1307041/


All Articles