How do I check the version of an assembly (dll)?

I have a C # application and when I made the changes I get the error:

An unhandled exception of type 'System.TypeLoadException' occurred in WindowsFormsApplication1.exe

Additional information: Could not load type
"TradeIdeas.TIProData.OddsMakerColumnConfiguration" from assembly 'TIProData, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null.

This post says the dll version number (TIProData) is 1.0.0.0. I think there is a later version. How do I find out the version number of a dll on my machine?

+3


source to share


3 answers


You can use Reflector , ILDASM or ILSpy to get the assembly version.

You can usually find ILDASM at C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\ildasm.exe

(where the v8.1A

Windows SDK version is installed).

ILDASM:



ildasm

Reflector:

reflector

+5


source


You can use AssemblyName.GetAssemblyName(string path)

from a small application.



More details here on MSDN .

+1


source


There are several ways to do this:

  • If you are referencing a dll in Visual Studio, right click it (in the ProjectName / References folder) and select Properties, there is Version and Runtime Version.

  • In File Explorer, when you right click on the dll file and select properties, there is "File Version" and "Product Version".

  • Alternatively, explore it in code:

    Assembly assembly = Assembly.LoadFrom("TestAssembly.dll");
    Version ver = assembly.GetName().Version;
    
          

0


source







All Articles