Keith Maurino
Keith Maurino

Reputation: 3432

How to get Assembly Version (not File Version) for another EXE?

You can use the following to get the File Version:

FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo("filename.exe");

But how can you get the Assembly Version for a specific EXE file?

Upvotes: 35

Views: 32670

Answers (1)

Daniel Renshaw
Daniel Renshaw

Reputation: 34177

From this blog article How to get assembly version without loading it:

AssemblyName.GetAssemblyName("filename.exe").Version

This avoids having to load the assembly in its entirity.

Upvotes: 65

Related Questions