[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

?? Environment.Version Reports Wrong Value ??

Tom Baxter

5/27/2008 2:51:00 AM

Hello all,

I have .NET 3.5 installed and I'm running VS 2008. I have a C# project
that's configured to use .NET 3.5 (in the project properties the "Target
Framework" is 3.5).

The following line of code:
Console.WriteLine(".NET Version: {0}", Environment.Version);
prints: .NET Version: 2.0.50727.1433

Why does Environment.Version not indicate 3.5?

Thanks

--
Tom Baxter


2 Answers

Henning Krause [MVP - Exchange]

5/27/2008 5:45:00 AM

0

Hello Tom,

the Environment.Version is correct, because it contains the version of the
CLR, which hasn't changed with .NET 3.5. .NET 3.5 just adds a bunch of new
assemblies.

Kind regards,
Henning Krause


"Tom Baxter" <tlbaxter99@yahoo.com> wrote in message
news:urKbOS6vIHA.1504@TK2MSFTNGP05.phx.gbl...
> Hello all,
>
> I have .NET 3.5 installed and I'm running VS 2008. I have a C# project
> that's configured to use .NET 3.5 (in the project properties the "Target
> Framework" is 3.5).
>
> The following line of code:
> Console.WriteLine(".NET Version: {0}", Environment.Version);
> prints: .NET Version: 2.0.50727.1433
>
> Why does Environment.Version not indicate 3.5?
>
> Thanks
>
> --
> Tom Baxter
>

Tom Baxter

5/27/2008 11:29:00 PM

0

Terrific. Thanks for the reply.

--
Tom Baxter



"Henning Krause [MVP - Exchange]" <newsgroups_remove@this.infinitec.de>
wrote in message news:%23847Xz7vIHA.3760@TK2MSFTNGP04.phx.gbl...
> Hello Tom,
>
> the Environment.Version is correct, because it contains the version of the
> CLR, which hasn't changed with .NET 3.5. .NET 3.5 just adds a bunch of new
> assemblies.
>
> Kind regards,
> Henning Krause
>
>
> "Tom Baxter" <tlbaxter99@yahoo.com> wrote in message
> news:urKbOS6vIHA.1504@TK2MSFTNGP05.phx.gbl...
>> Hello all,
>>
>> I have .NET 3.5 installed and I'm running VS 2008. I have a C# project
>> that's configured to use .NET 3.5 (in the project properties the "Target
>> Framework" is 3.5).
>>
>> The following line of code:
>> Console.WriteLine(".NET Version: {0}", Environment.Version);
>> prints: .NET Version: 2.0.50727.1433
>>
>> Why does Environment.Version not indicate 3.5?
>>
>> Thanks
>>
>> --
>> Tom Baxter
>>
>