I've encountered a strange problem. I've installed "Visual Studio 2010 ultimate". While installing it showed that it sucessfully installed .NET 4.0. While installing some other softwares. They complain that .NET 2.0 is missing and asking me to install it.
How is it possible? .NET 4.0 must include .NET 2.0 right?
EDIT:
Now, I'm confused. According to this http://en.wikipedia.org/wiki/File:DotNet.svg CLR is part of .NET 2.0. Installing .NET framework 4.0 implies installing the entire stack. which also includes a .NET 2.0. Please clear this confusion.
NET Framework 4.5 and later versions are backward-compatible with apps that were built with earlier versions of the . NET Framework. In other words, apps and components built with previous versions will work without modification on the . NET Framework 4.5 and later versions.
NET Framework 2.0 has been around for a decade but will be completely unsupported by Microsoft; the announced end of the extended support period is April 12, 2016. In lock-step with the . NET Framework, the corresponding version of Microsoft's development tool, Visual Studio 2005, is also at its end-of-life.
if you have 4.8 then you have 4.7. 2 automatically. did you install developer pack or runtime?
Support for . NET Framework 4 on Windows Server 2003 SP2 ended on July 14, 2015, and support on all other operating systems ended on January 12, 2016.
No. .NET 4.0 is a standalone CLR, it is NOT based on 2.0, unlike 3.0 and 3.5
.NET 4.0 is a new version of the runtime, it is independent of .NET 2.0.
New version of the framework don't encompass the previous versions, they are built as a specific version with a specific featureset. .NET 4.0 has a new runtime and newer BCL (base class library). The BCL essentially has all the same types as the .NET 2.0/3.0/3.5 BCL (albeit with possible breaking changes), and some new stuff. The two framework versions (v2.0 and v4.0) run side-by-side.
The fact that you haven't got .NET 2.0 installed is worrying as it's distributed through the Windows Update service. What OS are you using?
The problem is there are two "things" when you refer to .NET 2.0
or .NET 4.0
.
It is true that:
Using a helpful diagram from Microsoft's .NET Framework Versions and Dependencies:
The issue is that the Framework is different from the Runtime. There are six versions of the .NET Framework, but only four versions of .NET CLR (Common Language Runtime):
That means if you install the .NET Framework 4, you can still use the classes you used back in .NET 2. But if your application requires version 2 of the CLR it won't work - because that CLR 2.0 is not installed with .NET Framework 4.0.
As others have already said, .net 4.0 has a new CLR which is different from the .net 2.0 CLR.
By default an application will attempt to run on the CLR it was built against.
You can modify the applications.exe.config file with the <SupportedRuntime> element to explicitly tell the system which runtimes the application supports (The order specifies the preference):
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0.30319"/>
</startup>
</configuration>
(Obviously if there is something in your app that is dependant on something in .net 2.0 that has changed then this will still fail)
Unfortunately, if your application is failing to install, that's because the installer is checking explicitly that .net 2.0 exists rather than version>=2.0, if this is the case you could try looking for .zip downloads rather than installers, but other than that there isn't a lot you can do apart from installing .net 2.0 as well - side by side installs of multiple versions are fully supported.
Yes and no - you can run .NET 2 code on the .NET 4 runtime but they are separate runtime engines.
Depending on how the installer checks for .NET it must not be detecting 4 or maybe it's rejecting it as wrong: as ever it's safest to run code in the exact environment it was developed.
2/3.5 is a parallel install. I'd suggest you just install it - it shouldn't cause you any problems.
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