如何让C#6.0中的Visual Studio 2013的功能? [英] How to enable C# 6.0 feature in Visual Studio 2013?

查看:212
本文介绍了如何让C#6.0中的Visual Studio 2013的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正想通过引进C#6.0和只是按照汽车财产初始化的一个例子中的最新功能,

I was going through the latest features introduced in C# 6.0 and just follow an example of auto property initializer,

class NewSample
{
    public Guid Id { get; } = Guid.NewGuid();
}

但我的IDE不认识的语法。

but my IDE did not recognize the syntax.

我想知道我怎么能实现在Visual Studio 2013年目标框架,我使用4.5.1 C#6.0。

I am wondering how I could enable C# 6.0 in Visual Studio 2013. Target framework I am using 4.5.1.

推荐答案

根据这个的,它只是一个安装和去Visual Studio的下一篇:

Information for obsoleted prerelease software:

According to this it's just a install and go for Visual Studio 2013:

事实上,从本次发布安装C#6.0编译涉及不是安装一个Visual Studio 2013的扩展,从而更新的MSBuild目标文件的更多一点。

In fact, installing the C# 6.0 compiler from this release involves little more than installing a Visual Studio 2013 extension, which in turn updates the MSBuild target files.

所以才得到 https://github.com/dotnet/roslyn 文件,你准备好了。

So just get the files from https://github.com/dotnet/roslyn and you are ready to go.

你必须知道它是实现有规格过时的版本,因为他们不再为Visual Studio 2013更新包

您也可以尝试四月份的最终用户preVIEW,它安装上的Visual Studio 2013的顶部。
  (注:本VS 2013 preVIEW是相当过时,并且不再更新)

You can also try April's End User Preview, which installs on top of Visual Studio 2013. (note: this VS 2013 preview is quite out of date, and is no longer updated)

所以,如果你想使用最新的版本,你必须下载的Visual Studio 2015年

So if you do want to use the latest version, you have to download the Visual Studio 2015.

这篇关于如何让C#6.0中的Visual Studio 2013的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆