472,364 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 software developers and data experts.

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

Hi,

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

thanks!
-Yasutaka

Jul 21 '05 #1
4 6406
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.
Jul 21 '05 #2
> 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
Jul 21 '05 #3
Thanks Mattias,

The Assembly.ImageRuntimeVersion did it.

-Yasutaka
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:Ob**************@TK2MSFTNGP12.phx.gbl...
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.


Jul 21 '05 #4
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." <je**@nowhere.com>
| From: "Jeff B." <je**@nowhere.com>
| References: <Oz**************@TK2MSFTNGP12.phx.gbl>
| 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: <eS**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: webhost1.nngco.com 216.58.237.20
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.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
|
|
|

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ken Durden | last post by:
I'm hoping to develop a build process which only increments the version number of an assembly when either its contents or one of its dependencies has changed. Our assembly structure translates...
2
by: Scott | last post by:
Does anyone know of a way to get the .NET Framework version that's required by a specified assembly. I have a program I've written that creates a Windows Installer setup for any application....
1
by: tamarana | last post by:
Once I redirect an assembly to run on a different framework than that it was complied on, how do I get the version of the framework that the assembly is executing on. System.Environment.Version...
9
by: Alexander Baranovsky | last post by:
Hello friends, How I can determine full path of Microsoft.Basic.dll? Thanks, Alexander
4
by: Yasutaka Ito | last post by:
Hi, Is there a way to determine which version of .NET Framework any given assembly is built with? thanks! -Yasutaka
0
by: Felix | last post by:
Ok, I've had this issues since yesterday and I cannot figure out what's causing it. Basically, I have a Visual Studio 2005 Web Service. The service runs completely find on my local development...
5
by: John A Grandy | last post by:
How to use the .NET Reflector to determine which .NET version and assembly was compiled in ?
7
by: Aleksander Oven | last post by:
Hi, I'm building a native application that will host managed 3rd-party assemblies. Before loading each assembly, I'd like to check if the required CLR and .NET version are present, and display a...
1
by: Michael Bray | last post by:
Sorry for the post here, but I have a quick need - I have a DLL that I don't know what version of the framework it was built under. How can I determine that with standard tool. Thanks! -mdb
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.