6

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.

4 Answers 4

5

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.

Sign up to request clarification or add additional context in comments.

5 Comments

... a set of extra assemblies + new C#, VB.NET compilers.
I see, and if I were to use the 3.0 framework instead of 3.5, Microsoft Ajax would not be included?
Not quite correct. The call he refers to returns the version of the CLR, not the .NET Framework. 3.5 still runs on version 2.x of the CLR.
@Mehrdad Afshari - The .NET Framework 3.5 might ship with a new set of compilers, but the compilers and .NET assemblies are independent of each other. You can run .NET 3.5 on C# 2.0, but it would look extremely ugly.
Yes, my pedantry was related to your first sentence which may be interpreted as ".NET Framework 3.5 is nothing more than .NET 2.0+new assemblies". Totally minor issue though.
5

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.

Comments

3

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.

Comments

0

.NET 3.5 runs on the CLR version 2.0.

1 Comment

You mean .Net 3.5 runs on CLR 2.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.