Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to tell if a dll/exe is part of .NET platform?

Status
Not open for further replies.

DeveloperJr

Programmer
Mar 10, 2007
25
0
0
US
Hello everyone,

I am using reflection to get a list of the assemblies that are referenced in my dlls/exe. My goal is to find out programmatically if I do have references to .NET platform 1.x.
The idea is to loop through the list of referenced assemblies with major part of the version equal to 1 and send the string name of the assembly to a function to answer the question “Is this assembly belongs to the .NET platform?”
My problem is that I can’t find a comprehensive list of all the dlls that constitute the .NET platform to be able to reliably implement the above mentioned method. Any suggestions/ideas?

Thank you all in advance.

 
You might take a look at this:


The article has links to several free and GPL utilities to examine a PE header, some of which come with source.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hi,

Thanks for your kind reply but I am afraid we are talking about 2 different things. I have no interest – not for this task at least – in digging into the details of the PE format neither this is what I am trying to do. What I am after simply is that if I have a dll, I need to infer – by some how – if it is part of the .NET platform or not. For example, I know that MSCorLib.dll is a central part of the framework so does System.dll and System.Text.dll, System.Drowing.dll, etc. What I am trying to assemble – or acquire – is a comprehensive list of these .NET core libraries so I can load them into a dictionary lookup my dll to decide if it is a member of the .NET framework itself or not. Any ideas or advices will be highly appreciated.
 
OK, then I reccommend you do a clean install of Windows XP and Windows Server 2003 on a machine or in a VM. You can then go look at c:\windows\assembly to get a list of shipping assemblies from the GAC.

The reason for looking at both OS's is because a workstation install of .NET is different from a server install of .NET (there are differences in the garbage collection strategy and other differences as well).

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top