2

I have installed .NET Framework 4.7 as well as the "Targeting Pack" available from Here. I then went and updated my the target framework to 4.7 on all my projects. Despite this, Visual Studio 2015 refuses to compile C# 7.0 syntax. Is there another step I am missing? OS is Windows 7 SP1.

Dave
  • 2,473
  • 2
  • 30
  • 55
  • 3
    Well no, VS2015 only supports C# 6. You need VS2017 for proper C# 7 support. (Using an updated Roslyn version will build correctly but the IDE itself still won't understand the syntax etc.) – Jon Skeet Sep 26 '17 at 19:54
  • I found [this](https://stackoverflow.com/questions/39461407/how-to-use-c7-with-visual-studio-2015) question, it may help. – dcg Sep 26 '17 at 19:55

1 Answers1

3

To be able to use the new C# 7 language features, you need a C# compiler that understands these features.
VS.NET 2017 has a compiler that supports these features. The C# compiler incorporated in VS.NET 2015 does not.

Frederik Gheysels
  • 56,135
  • 11
  • 101
  • 154