I've just installed .net core 1.0 and run the sample hello world. My question:
The language itself isn't generally tied to a specific runtime/framework, although some language features do require framework features. (For example, interpolated strings are a bit more flexible on .NET 4.6 than on .NET 2.0 due to the presence of FormattableString
.) However, there are two things to consider:
dotnet cli
)The SDK supports C# 6 out of the box. I would personally expect the C# 7 version of the Roslyn packages to support .NET Core as well (e.g. targeting netstandard1.5
), so code that compiles more code at execution time should be fine on that front. I don't know what the plan is in terms of tying compiler versions to SDK versions - I suspect that will become clearer when the project.json to msbuild transition is complete.
I don't know of any way of determining what language version a particular SDK supports out of the box - it would be reasonably easy to come up with a sequence of small classes which exercise particular language features and see if they compile, of course. Trickier would be to come up with code that builds with multiple versions but gives different results; there are ways of doing that between consecutive language versions (at least 2-3, 3-4, 4-5... not sure about 5-6) but they're slightly more convoluted.
See more on this question at Stackoverflow