1

once upon a time a long, long time ago we used to see the .net version a library (dll) or executable was compiled with when you viewed the files properties via file explorer. Now you cant, so what’s the quickest way of checking what version it uses now ? I've been playing with various tools like ILSpy, but I need to have something that’s just easy to install like a reg entry so I can right click and view version.

We have loads of files on multiple servers, including client servers. Sometimes we need to ask what version are you running, at the moment its proving difficult.

any ideas ?

Karlsbergs
  • 61
  • 5
  • Indeed it is, thanks Adriani6 ! – Karlsbergs Mar 19 '19 at 15:26
  • No problem, check out my answer below too. That wasn't in the duplicate as I have discovered but could potentially be useful. If it is not, I'll happily delete. – Adrian Mar 19 '19 at 15:27
  • .NET assemblies target a runtime version, not a framework version. So you'd see 2.0.50727 or v4.0.30319, even if you target .NET 3.5 or 4.03. They however could not keep that reliable at .NET 4.5, it has rather big internal changes to support WinRT. So compilers these days also emit a [TargetFrameworkAttribute], it gives you the framework version, any half-decent decompiler can show you. – Hans Passant Mar 19 '19 at 15:45

1 Answers1

1

A quick way (that's not in the duplicate I've marked) would be to use a text editor to edit the .dll and search for the following phase ".NETFramework,Version=v"

Beside v you'll get the version number that the assembly was built against (in my case 4.6.1).

Adrian
  • 8,271
  • 2
  • 26
  • 43