Why can't I show ASP.NET Framework version as 3.5?

Can someone please confirm to me that when my application is written in .NET 3.5, this code

System.Environment.Version.Major.ToString() 

will produce it

 2.0.50727.1433 

I am just moving on to 3.5, and the first application I am moving is an internal website. I thought that a very simple indicator is to add a Framework version next to my version of the application, but the text above is what is being produced.

My limited research shows that .NET 3.5 is the "flavor" of version 2.0, so the basic version of the frame will remain at 2.0. IIS application pool settings assume this is so.

Is this correct, or can I make the application show 3.5?

Greetings

+4
source share
1 answer

Because .NET 3.5 uses the CLR version of version 2. 3.5 is just a collection of builds built on top of version 2.0. Internal APIs cannot be distinguished from each other. Here is some code that will tell you if 3.5 is present:

http://blogs.msdn.com/astebner/archive/2007/11/29/6608419.aspx

Note that this will not tell you if your code really works with 3.5, but you should still take care of this in your manifest.

+11
source

All Articles