It appears that VSTS does not support C# 7, as I'm getting a build error which would would indicate the C# 6 compiler is being used. How do I enable C# 7, or what am I doing wrong? I'm using Visual Studio 2017, targeting .NET 4.6.1.
I would rather not have to revert C# 7 changes I've added if possible. As can be seen in the screenshot of Visual Studio and the console in VSTS, there is a difference in the version of C# in use.
OK so it turns out that it was a simple fix, it was a counter-intuitive option in the UI. There's actually 2 places that configure the version of Visual Studio being used in VSTS. It needs to be set to Visual Studio 2017
or Latest
and Hosted VS2017
. Why there are 2 options is not very clear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With