I have some build agents that is building .NET code for us through a TeamCity setup, and I'm beginning to wonder if despite the project settings, they're outputting .NET 4.5 built assemblies. My doubts come from the fact that I don't know if Windows 2012 Server came with .NET 4.5 or 4.0 out of the box and thus whether it ever has had only 4.0 or any of the 4.0 assemblies available.
How can I look at a assembly on disk and determine whether it has been built with .NET 4.0 or 4.5?
As is evident by this blog post by Marc Gravell, there are differences in how these assemblies are built, even though we may not actually use any .NET 4.5 assemblies / features specifically.
I tried using ILDASM on the assembly, but the metadata reference on a known .NET 4.5(.1) console application still says 4.0:
// Metadata version: v4.0.30319
I tried starting the application Windows 7 with only .NET 4.0 installed, and it starts, but if the only way to figure out if everything works is by testing everything, then I'd rather try a bit more to see if it is built with the right version first.
So is this possible?