c# - MSIL - Can I find the Visual Studio version that was used to build/compile a .NET assembly? -
is program name used build assembly written assembly available anywhere in msil code?
visual studio doesn't build anything - visual studio uses msbuild building1:
visual studio hosts msbuild load , build managed projects.
in fact can build msil code without visual studio downloading microsoft build tools:
if don't have visual studio installed on computer, can use build tools 2013 build managed applications. visual basic , c# compilers included in download. (in earlier versions, these tools included in stand-alone .net framework.)
any compiler satisfies ecma 335 standard can compile valid common language infrastructure (cli) applications - mono c# compiler 1 such example.
in other words, don't think it's possible obtain information visual studio version assembly.
unless additional metadata added assembly visual studio (i don't think is), find out version of visual studio built specific assembly, you'd have adding own custom attributes assembly, use reflection retrieve.
obviously, can rule out earlier versions of visual studio based on .net version assembly targets (e.g. visual studio 2012 first support .net 4.5).
this table compiled wikipedia article visual studio:
.net min visual studio version 1.0 2002 (7.0) 1.1 2003 (7.1) 2.0 2005 (8.0) 3.0 2005 (8.0) 3.5 2008 (9.0) 4.0 2010 (10.0) 4.5 2012 (11.0) 4.5.1 2012 (11.0) 4.5.2 2012 (11.0) 4.6 2015 (14.0)
1 visual studio 2015 , above, default, uses new roslyn compiler compile.
Comments
Post a Comment