How can the new C# 6.0 syntax features be used in scriptCS?

490 Views Asked by At

If I try to compile the following code with scriptCS it fails compilation with a syntax error for the line containing the primary constructor (Error CS 1514 '{' expected to be exact):

public class MyClass(string someName)
{
    public string Name { get; } = someName;
}

I know that the new syntax features have to be enabled on a per-project basis in the first CTP of Visual Studio 2014, but couldn't find a similar setting for scriptCS (or any other information about C# 6 and scriptCS). My understanding is, that scriptCS is using Roslyn, so there should be a way to support those features.

So how do I enable the new C# 6 syntax features in scriptCS? Or isn't that possible (yet)?

0

There are 0 best solutions below