Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# 6.0 Support in Visual Studio 2012

I have been working at my current company for a little over six months and we're currently using Visual Studio 2012. We are going to start building a new application and I've been trying to get a commitment to a Visual Studio 2015 upgrade so that we can start with the latest technology. Unfortunately it's a small company and there are budgets to consider.

Does anyone know if C# 6.0 will be supported in Visual studio 2012. I'm thinking that, since it's about to become 3rd generation old it may not get support.

UPDATE:

I saw a lot of comments related to the community edition of VS2015 so I thought I would clarify my company's position regarding that version. The company has around 20 employees and a 6 person IT team who all need VS for various reasons. We also have over $1M sales so we can not qualify for community edition.

UPDATE 2:

Q: Is there some specific feature in C# 6.0 you can't live without?

A: Not any particular feature although property initializers and primary constructors will cut down on a lot of chaff in code.

like image 278
Roland Schaer Avatar asked Feb 20 '15 21:02

Roland Schaer


1 Answers

Yes, you can install c# 6.0 into VS2012 and VS2013 on a per project basis as a NuGet package. You'll have to install this package for every project that you want c# 6.0 features in.

https://www.nuget.org/packages/Microsoft.Net.Compilers/

Installing Latest C# Compiler via Nuget

Install-Package Microsoft.Net.Compilers

EDIT: As pointed out in the comments below, upgrade your NuGet to the latest version in order to ensure full compatibility with the nuspec file.

like image 131
Alex Tselevich Avatar answered Sep 25 '22 22:09

Alex Tselevich