[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Discover which version of framework an assembly is compiled against

Posted on 2006-05-27
6
Medium Priority
?
398 Views
Last Modified: 2010-04-16
Hi everyone

One of my friends has emailed me a .net assembly and I want to find out which version of the .net framework it's compiled against. Is there a tool that I can use to find out if the assembly was compiled using framework 1.1 or framework 2.0?

Also if the assembly was compiled against version 2, is there a tool that will allow me to down compile to version 1.1 (assuming that no 2.0 specific code is being used)?

Regards
0
Comment
Question by:brimful
  • 4
  • 2
6 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 1600 total points
ID: 16776558
Hi brimful,
----------

you could use ILDASM to determine the mscorlib dll version

for basic ILDASM usage
http://msdn.microsoft.com/msdnmag/issues/01/05/bugslayer/

--
for .net 1.1 it returns something like

 .assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         //
.z\V.4..
  .ver 1:0:5000:0

}

for .net 1.0 it was  ver 1.0.3300

for .net 2.0 i'm not sure though but i assume it would start with 2.0 ;-)
--

----------
bruintje
share what you know, learn what you don't
0
 

Author Comment

by:brimful
ID: 16776576
and how would I down compile the assembly from 2.0 to 1.1 or use a 2.0 assembly with 1.1 (assuming that the assembly doesn't have any 2.0 specific code)?

0
 
LVL 44

Expert Comment

by:bruintje
ID: 16776599
as far as i know you can't without having the source code

there are decompilers around but i think they only show you the source not give you back files needed to recompile for another version of the framework

if it's build for 2.0 then it will only run on 2.0 framework this is how its build by Microsoft, only if you can get the source you can compile it yourself for 1.1 in a new project

what you can do is install version of the framework besides 1.1 and work with the 2.0 assembly in a new 2.0 project but you can't mix them up in one project
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 44

Expert Comment

by:bruintje
ID: 16776603
should've been

what you can do is install version 2.0 of the framework besides 1.1 and work with the 2.0 assembly in a new 2.0 project but you can't mix them up in one project
0
 

Author Comment

by:brimful
ID: 16776614
ok just ran ildasm. Assembly is compiled against version 2.0 :(

Hmm looks like I'll need to upgrade to vs 2005 or get provider to down compile to version 1.1
0
 
LVL 44

Expert Comment

by:bruintje
ID: 16776618
yeah thats sad indeed, forgot that if you want to use 2.0 you also need to upgrade the IDE or use the Express version which i haven't tried running side by side with VS 2003
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question