|
-
April 9th, 2003, 06:56 AM
#1
read .NET Framework version in PE file header
Hi all!
As it is written here: http://msdn.microsoft.com/library/de...dexsidenet.asp
, in the header of a PE file, there it is written the .NET Framework version, the application was built by.
How could I read out this .NET Framework version info using C#?
Thx a lot.
-
April 9th, 2003, 04:51 PM
#2
you mean you want to know the .NET framework version using C# program ! right !
try,
Environment.Version
Paresh
- Software Architect
-
April 10th, 2003, 10:36 AM
#3
nearly this one
What I exactly need is following:
There is a PE file(exe or dll). I want to read the version of .NET Framework(the version which was used during the building of this PE file) from the header of this file by a C# program.
Thx.
-
April 10th, 2003, 12:14 PM
#4
for example,
Assembly ab = Assembly.LoadFrom("exe or dll file");
ab.GetName().Version.Minor
Version has all.
and GetName(). you can get culture info etc... all the information.
Paresh
- Software Architect
-
May 6th, 2003, 06:18 AM
#5
Frramework version
This is still not what I really need.
I have a file WinApp.exe. I need to detect what version of .NET FRamework was this file created by (1.0.3705 or 1.1.4322...). I would need to detect it by a C# program.
Any help would be great.
Thx.
-
May 6th, 2003, 06:34 AM
#6
Did you build that application yourself ?
If so: If you build it using visual studio .net 2002 it's one of the 1.0 network versions (SP1 or SP2). If you build it with visual studio .net 2003 it's 1.1
I guess paresh is right with Environment.Version
WM.
What about weapons of mass construction?
-
May 7th, 2003, 04:24 AM
#7
Outer application
No I meant an app.exe file built not by me. So I only know that it is an .NET assembly, but I do not know what Framework version was used to build it and I would need to detect it.
Any ideas?
Thx a lot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|