473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6572
Is there a way to determine which version of .NET Framework any given
assembly is built with?


Check Assembly.ImageR untimeVersion 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.Environm ent.Version.ToS tring()

--
Thanks, Jeff
Jul 21 '05 #3
Thanks Mattias,

The Assembly.ImageR untimeVersion did it.

-Yasutaka
"Mattias Sjögren" <ma************ ********@mvps.o rg> wrote in message
news:Ob******** ******@TK2MSFTN GP12.phx.gbl...
Is there a way to determine which version of .NET Framework any given
assembly is built with?


Check Assembly.ImageR untimeVersion 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.c om>
| From: "Jeff B." <je**@nowhere.c om>
| 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.publi c.dotnet.genera l
| NNTP-Posting-Host: webhost1.nngco. com 216.58.237.20
| Path:
cpmsftngxa07.ph x.gbl!cpmsftngx a10.phx.gbl!TK2 MSFTNGXA05.phx. gbl!TK2MSFTNGP0 8
..phx.gbl!TK2MS FTNGP11.phx.gbl
| Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:124495
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| > 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.Environm ent.Version.ToS tring()
|
| --
| Thanks, Jeff
|
|
|

Jul 21 '05 #5

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

Similar topics

1
3588
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 directly to a directory structure, so its pretty easy to see if any given assembly has changed. How can I, from a build script, figure out what other assemblies any given assembly references? Also, is there anyway to re-version an assembly after...
2
4724
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. However, for many of the programs I work with there are a lot of files that have come from other developers, and I'd like to be able to determine programmatically which version of the Framework is required by each assembly. This way I'll know which...
1
1360
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 gives the version of the framework that the assembly was built on.
9
6819
by: Alexander Baranovsky | last post by:
Hello friends, How I can determine full path of Microsoft.Basic.dll? Thanks, Alexander
4
1449
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
3174
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 environment (running WinXP, with .NET 1.1 & .NET 2.0 installed). I would normally Publish the website to another machine using the built in "Publish" in VS 2005. I publish to a file system on a remote machine running ..NET 2.0 Framework. I...
5
4593
by: John A Grandy | last post by:
How to use the .NET Reflector to determine which .NET version and assembly was compiled in ?
7
5781
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 warning if it turns out they're not. Using the GetFileVersion unmanaged API gets me the CLR version that assembly was linked against when it was built. For assemblies built with VS2008, this will almost invariably be v2.0.50727, since this is...
1
2351
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
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.