Viewing the DLL version on a mac using Mono

Reading Time: 2 minutes

If you work with the Mono .Net platform like I do (ie: developing mobile apps using MonotTouch and Mono for Android) it sometimes comes in handy to view the version of a DLL file in a project.

I found out a way how this to check the DLL version info when i needed to check some DLL versions of an iOS app that was already published on Apple’s AppStore.

Just use the Mono Common Intermediate Language Disassembler like this:

Where foo is the target dll from which you want to check out the version info, naturally.

This will give you output like the example output below, including the version number:

UPDATE: Since the above trick didn’t seem to work for the monotouch.dll (it didn’t show a version number this way) I asked Xamarin if versioning could be applied. They replied my answer by pointing to this Stackoverflow question and the answer given there as a possible solution.

Basically, it says the following:

  1. Go to the <> directory. monotouch.dll is present there as well.
  2. create a version.cs file containing the following code:
  3. Compile the version.cs along with the monotouch.dll library using the following command:
  4. Run the resulting version.exe file using the following command:

That should output the version number, depending on if the linker removed the field or not.