Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I find to what target .NET dll was built looking into the file?

I have a bit of mess with projects coming some on 4.0 some on 3.5

Is it possible to find out what version of .NET was the dll built looking into the file (not from code!) ?

like image 819
Boppity Bop Avatar asked Jul 26 '10 09:07

Boppity Bop


People also ask

How do I find the Assembly version of a dll?

If you reference the dll in Visual Studio right click it (in ProjectName/References folder) and select "Properties" you have "Version" and "Runtime Version" there. In File Explorer when you right click the dll file and select properties there is a "File Version" and "Product Version" there.


2 Answers

You could use ildasm.exe:

ildasm assembly.dll

Then double click on MANIFEST and look at the version:

  • Metadata version: v4.0.30319 (CLR 4.0, meaning .NET 4.0)

  • Metadata version: v2.0.50727 (CLR 2.0, meaning .NET 2.0 to .NET 3.5)

like image 58
Darin Dimitrov Avatar answered Sep 21 '22 05:09

Darin Dimitrov


Ildasm (comes with VS) can show you what version of the framework DLLs it's referencing.

like image 45
Will Dean Avatar answered Sep 23 '22 05:09

Will Dean