3

Possible Duplicate:
How to load an assembly without using Assembly.Load?

How to get an assembly version without locking the file?

Community
  • 1
  • 1
Simon
  • 33,714
  • 21
  • 133
  • 202
  • 1
    Exact duplicate: http://stackoverflow.com/questions/1646049/how-to-load-an-assembly-without-using-assembly-load – Chris Laplante Feb 01 '11 at 00:43
  • 2
    @simplecoder. not an "exact duplicate" at all. while the answer you point to would allow me to get the version it requires the loading of the entire assembly into memory. Not ideal if I only need the version number. I found a much more optimal solution below. – Simon Feb 01 '11 at 02:30

1 Answers1

3

Worked it out

var targetVersion = AssemblyName.GetAssemblyName(filePath).Version;
Simon
  • 33,714
  • 21
  • 133
  • 202