Krishna Kumar
Krishna Kumar

Reputation: 4884

How can you determine what version(s) of .NET are running on a system?

What are the different ways (programmatically and otherwise) to determine what versions of .NET are running on a system?

Upvotes: 13

Views: 18739

Answers (6)

cognitiaclaeves
cognitiaclaeves

Reputation: 69

I found How to check .NET Framework version installed much more usable. Essentially, open Internet Explorer, and paste this into the address bar:

javascript:alert(navigator.userAgent)

I don't know if it always works, or if it is complete, but it works for my uses, doesn't require a lot of extra reading, and works without installing anything additional.

Upvotes: 2

Darren Kopp
Darren Kopp

Reputation: 77687

Get the smallest .NET Framework download possible that will tell you based on the headers you are sending. It only works on Internet Explorer or if you have the Firefox extension installed. More info in Hanselman's blog post.

Upvotes: 0

Jimmy Chandra
Jimmy Chandra

Reputation: 6580

It's not necessarily running I would say. Since you can have .NET 1.1, 2.0, 3.0 and 3.5 installed on the same machine and they can run perfectly side-by-side. Meaning one of your app can be running on top of 1.1 and another web application is running on 2.0.

In IIS (for web app), this is quite easy, just go to the property of the virtual directory / application and go to the ASP.NET tab, you should see what version of .NET you are actually using (or rather, what version of ASP.NET which is pretty much tied into the .NET Framework version).

ps. just remember, you can only run 1 version of .NET Framework per application pool in IIS. So if you try to use the same application pool to run different versions of the framework, you're in for a surprise. Solution is to just create a framework version specific application pool (i.e. one pool for all 1.1 framework and another for 2.0 framework)

Upvotes: 0

Ryan Farley
Ryan Farley

Reputation: 11431

If you're wanting the current framework version in use then you can see that via:

System.Environment.Version

Upvotes: 3

chrisofspades
chrisofspades

Reputation: 847

If you're using IIS6 and above, open up IIS and click on Web Service Extensions. It will list each framework installed. Granted, .NET 3.0 and 3.5 are both based on the 2.0 framework.

Upvotes: 0

Related Questions