PC Review


Reply
Thread Tools Rate Thread

How to determine which version of .NET Framework any given assembly is built with?

 
 
Yasutaka Ito
Guest
Posts: n/a
 
      12th Feb 2004
Hi,

Is there a way to determine which version of .NET Framework any given
assembly is built with?

thanks!
-Yasutaka

 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      12th Feb 2004

>Is there a way to determine which version of .NET Framework any given
>assembly is built with?


Check Assembly.ImageRuntimeVersion or the version of Mscorlib.dll it
references.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
 
Jeff B.
Guest
Posts: n/a
 
      12th Feb 2004
> Is there a way to determine which version of .NET Framework any given
> assembly is built with?


If you're trying to do it within code you can use:

System.Environment.Version.ToString()

--
Thanks, Jeff


 
Reply With Quote
 
Yasutaka Ito
Guest
Posts: n/a
 
      13th Feb 2004
Thanks Mattias,

The Assembly.ImageRuntimeVersion did it.

-Yasutaka


"Mattias Sjögren" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> >Is there a way to determine which version of .NET Framework any given
> >assembly is built with?

>
> Check Assembly.ImageRuntimeVersion or the version of Mscorlib.dll it
> references.
>
>
>
> Mattias
>
> --
> Mattias Sjögren [MVP] mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.


 
Reply With Quote
 
Tim Kurtzman
Guest
Posts: n/a
 
      13th Feb 2004
That would give you the version of the runtime that was currently
executing... not what version the assemblu was built with.

If you wanted to do this from unmanaged code, you can call the function
GetFileVersion found in mscoree.dll.

Tim


--------------------
| Reply-To: "Jeff B." <(E-Mail Removed)>
| From: "Jeff B." <(E-Mail Removed)>
| References: <(E-Mail Removed)>
| Subject: Re: How to determine which version of .NET Framework any given
assembly is built with?
| Date: Thu, 12 Feb 2004 12:46:21 -0600
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <(E-Mail Removed)>
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: webhost1.nngco.com 216.58.237.20
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.general:124495
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| > Is there a way to determine which version of .NET Framework any given
| > assembly is built with?
|
| If you're trying to do it within code you can use:
|
| System.Environment.Version.ToString()
|
| --
| Thanks, Jeff
|
|
|

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine the version of .net framework that the assembly is executing tamarana Microsoft VB .NET 1 28th Sep 2004 02:55 PM
Determine Assembly's .NET Framework Version Z D Microsoft Dot NET Framework 11 7th May 2004 06:17 PM
Determine Assembly's .NET Framework Version Z D Microsoft VB .NET 11 7th May 2004 06:17 PM
Determine Assembly's .NET Framework Version Z D Microsoft C# .NET 11 7th May 2004 06:17 PM
Determine Framework version from assembly Scott Microsoft VB .NET 2 5th Feb 2004 02:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:49 AM.