What CLR is needed for C# 6?

限于喜欢 提交于 2019-11-28 06:58:17

问题


The title says it all: what CLR version is / will be needed to run C# 6 programs? The CLR version is interesting to find out the system requirements and supported operating systems.

I googled [1] [2] and had a look at Wikipedia and MSDN but could not find the information.


回答1:


C # 6 language enhancements is compatible to .net framework starting from 2.0 to 4.6. It does not require any higher version of .net framework but need higher version of Visual studio such as VS 2015. C# 6 is also available to VS 2013 with addon https://github.com/dotnet/roslyn




回答2:


It is version 4 of CLR that is used. If you test Environment.Version in Visual Studio "14" CTPs you will get:

4.0.30319.35317

With code:

Console.WriteLine(Environment.Version);

Also if you look at Common Language Runtime (CLR) on MSDN you will find:

.Net Framework Version                     CLR Version
4.5 (including 4.5.1 and 4.5.2)            4



回答3:


In order to have C# 6 you need:

  • VS 2013
  • Download C# 6 from Codeplex -Roslyn

VS 2013 runs on .NET 4.5.1 so I guess the answer to your Question is 4.5.1



来源:https://stackoverflow.com/questions/23605210/what-clr-is-needed-for-c-sharp-6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!