Reputation: 1600
So the windows have different versions of .net framework, 1.0, 1.1, 2.0, 3.0, 3.5 along with Service packs for particular frameworks. Now my windows have several versions of the said frameworks and what confuses me is that are these uninstallable or installable? Can I remove older versions If I am just using let's say 3.5 or 4.0 with ASP.NET and Visual Studio?
One more question, Do windows relies on .net framework? I mean can my machine work if it doesn't have any .net framework? :)
Upvotes: 3
Views: 517
Reputation: 52351
Reading the answers, I feel that it is quite confusing topic, so will try to give my own answer.
First, what do you call by the version of .NET Framework? In fact, it can mean several things:
The stuff in Add/Remove programs (Uninstall a program in Programs and Features under Windows 7) control panel item or the stuff in Turn Windows features on or off list.
The set of installed components.
The setup executable you would download from Microsoft website when you want to install .NET Framework.
The CLR. See the great comment by Nate Bross to the answer posted by simendsjo on this page for more details.
Depending of what do you mean by .NET Framework version, the answer will be different.
In Uninstall a program and Turn Windows features on or off, you can probably find one or two latest versions. Currently, I have .NET Framework 3.5.1 as "Windows feature", and .NET Framework 4.0 in "Uninstall a program". I would not expect any other versions here, since a program compiled for .NET Framework 2.0 will run fine on a machine with .NET Framework 3.5. As a proof, compile a Hello World targeting .NET Framework 2.0 and start it: it starts.
In C:\Windows\Microsoft.NET\Framework
, you would rather find every version, from 1.0.3705 to 4.0. Why? Because every new version of the framework adds features to the older versions, instead of rewriting everything. Here, I would strongly discourage to remove even the directory v2.0.50727. Probably the most recent programs written in Visual Studio 2010 and compiled to run with .NET Framework 4.0 still require 2.0 components.
When downloading .NET Framework setup executable, you don't have to think about older versions, as well as you don't have to download every version from 1.0 to 4.0. Download only the most recent one, it will be fine.
Note: it is essential to understand that the different versions are not standalone, but rather change or add something from/to the older versions. That's all the stuff about references to .NET Framework assemblies. For example, you could have a strange situation: a basic application which uses WCF (WCF was released in .NET 3.0) runs well on a machine which has only .NET Framework 2.0 installed, but crashes only when trying to execute something related to WCF: assemblies are loaded on demand, so until you require a component from .NET Framework 3.0, components from older versions will be used.
Hope this makes things easier to understand.
One more question, Do windows relies on .net framework? I mean can my machine work if it doesn't have any .net framework? :)
The operating system itself does not need .NET Framework to function properly. But some components require .NET Framework. As ChrisF said, Microsoft XPS Viewer/Printer is an example. Microsoft Live Writer is another one.
Upvotes: 1
Reputation: 31606
If I remember correctly 2.0 and 3.0 are required for 3.5.
4.0 can exist on it's own.
I think 1.1 depends on 1.0 as well.
I know for sure XP doesn't rely on any .NET framework to operate, but I'm not sure about Vista/7
Edit:
Just did some testing on an XP Virtual Machine. Interesting results... With only 2.0 and 4.0 installed, I was able to run a console app compiled to 3.5. If I use LINQ however (or I suspect any library not in 2.0) it crashes when the method is called. If the code that uses LINQ isn't called, it doesn't crash.
With only 4.0 installed and nothing else, the same app gives the following message when run:
To run this application, you first must install one of the following versions of the .NET Framework:
v2.0.50727
Would you like to download and install version v2.0.50727 of the .NET Framework now?
Clicking yes brings up the page to download .NET... except it's the .NET 4.0 download page...
Upvotes: 0
Reputation: 137178
While the different versions of the .NET framework are separate, certain applications require that they all are present on a machine:
If you are installing Microsoft XPS Viewer (which requires Microsoft .NET Framework 3.0) on Windows XP or Windows Server 2003 and do not have previous versions of .NET Framework (1.1 and 2.0) installed, you will be asked to download them during the install process. (45 MB)
One more question, Do windows relies on .net framework? I mean can my machine work if it doesn't have any .net framework? :)
XP certainly doesn't - it predates .NET by several years.
Vista and Windows 7 include .NET 3, so in one sense they do rely on it, but as it's a feature you can turn off (thanks MainMa) there don't.
Upvotes: 1
Reputation: 10658
If you have installed the latest framework (4.0), you don't need to install previos versions. I'm not sure you can remove previos version have installed after installing the latest framework: I'm not sure add/remove program control panel applet displays that versions.
And second question: few application in Windows Vista and Windows 7 depends on .NET framework, but Windows itself doesn't.
Upvotes: 1
Reputation: 4749
Just found this
Note Most of the time, you can use the latest version of the .NET Framework to run applications that were created by using earlier versions of the .NET Framework.
So I would think it's best to leave them. But then again... How many 1.0 programs do you have installed? :)
Upvotes: 0