cc0
cc0

Reputation: 1950

Difference between ASP.NET and .NET framework version

I realize this is probably a hopelessly newbie question, but what is the difference between the ASP.NET version and the .NET framework version?

I am making an asp.net site using the .net 3.5 framework, but when I echo this;

System.Environment.Version.ToString()

I get "2.0.50727.4927".

Is this then an ASP.NET 2.0 site? This seems odd since I am using visual studio 2008 and the .net 3.5 framework.

Upvotes: 6

Views: 11234

Answers (4)

Daniel A. White
Daniel A. White

Reputation: 191048

.NET 3.5 runs on the CLR version 2.0.

Upvotes: 0

Justin Niessner
Justin Niessner

Reputation: 245489

You're getting the CLR version...not the Framework version.

Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.

Framework 3.5 still runs on the 2.x version of the CLR.

Upvotes: 5

David Morton
David Morton

Reputation: 16505

No, the .NET Framework 3.5 version is simply a set of extra assemblies that are referenced in addition to the core .NET 2.0 assemblies, so calling System.Environment.Version.ToString() will always return 2.0.50727.4927 for all versions from .NET 2.0 up to .NET 3.5.

You're running .NET 3.5 if you're referencing .NET 3.5 assemblies.

Upvotes: 5

Oded
Oded

Reputation: 499352

ASP.NET is a web framework written in and utilizing the .NET framework.

What you are getting the the version of the .NET runtime that the ASP.NET site is running under.

This runtime has several extensions to it, and .NET 3.5 is one - it still uses the .NET 2.0 runtime.

You can consider your site to be .NET 3.5 if you have included those libraries and are using their features such as Linq. See wikepedia for more details.

Upvotes: 3

Related Questions