MSIL - 我能否找到用于 build/compile .NET 程序集的 Visual Studio 版本?
MSIL - Can I find the Visual Studio version that was used to build/compile a .NET assembly?
用于构建程序集的程序名是否在 MSIL 代码中的任何位置可用?
Visual Studio 不构建 任何东西 - Visual Studio 使用 MSBuild 构建1:
Visual Studio hosts MSBuild to load and build managed projects.
事实上,您可以通过下载 Microsoft Build Tools:
构建 MSIL 代码 而无需 Visual Studio
If you don't have Visual Studio installed on your computer, you can use Build Tools 2013 to build managed applications. The Visual Basic and C# compilers are also included in this download. (In earlier versions, these tools were included in the stand-alone .NET Framework.)
满足ECMA 335 standard can compile valid Common Language Infrastructure (CLI) applications - the Mono C# 编译器的任何 编译器就是这样一个例子。
换句话说,我认为不可能从程序集获取有关 Visual Studio 版本的信息。
除非Visual Studio向程序集添加了一些额外的元数据(我不认为是),找出[=46=的版本] 构建一个特定的程序集,你必须做一些事情,比如将你自己的自定义属性添加到程序集,然后你可以使用反射来检索。
显然,您可以根据程序集针对的 .NET 版本排除 Visual Studio 的早期版本(例如 Visual Studio 2012 是第一个支持 .NET 4.5 的版本)。
此 table 是从 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及以上版本,默认使用新的Roslyn编译器编译。
用于构建程序集的程序名是否在 MSIL 代码中的任何位置可用?
Visual Studio 不构建 任何东西 - Visual Studio 使用 MSBuild 构建1:
Visual Studio hosts MSBuild to load and build managed projects.
事实上,您可以通过下载 Microsoft Build Tools:
构建 MSIL 代码 而无需 Visual StudioIf you don't have Visual Studio installed on your computer, you can use Build Tools 2013 to build managed applications. The Visual Basic and C# compilers are also included in this download. (In earlier versions, these tools were included in the stand-alone .NET Framework.)
满足ECMA 335 standard can compile valid Common Language Infrastructure (CLI) applications - the Mono C# 编译器的任何 编译器就是这样一个例子。
换句话说,我认为不可能从程序集获取有关 Visual Studio 版本的信息。
除非Visual Studio向程序集添加了一些额外的元数据(我不认为是),找出[=46=的版本] 构建一个特定的程序集,你必须做一些事情,比如将你自己的自定义属性添加到程序集,然后你可以使用反射来检索。
显然,您可以根据程序集针对的 .NET 版本排除 Visual Studio 的早期版本(例如 Visual Studio 2012 是第一个支持 .NET 4.5 的版本)。
此 table 是从 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及以上版本,默认使用新的Roslyn编译器编译。