Closed j3parker closed 4 years ago
To test:
If we make a csproj with <TargetFrameworks>net20;net48</TargetFrameworks>
, what does MSBuild do for the langauge version?
If it chooses "the latest supported language version for your framework" by default (we have some suspicions that this might be the case) does it mean you need #ifdef
s to use newer language features?
If you set an explicit value in your csproj does it apply for all frameworks or is there any sort of ceiling logic going on? (Seems unlikely).
Target framework | version | C# language version default |
---|---|---|
.NET Core | 3.x | C# 8.0 |
.NET Core | 2.x | C# 7.3 |
.NET Standard | all | C# 7.3 |
.NET Framework | all | C# 7.3 |
I'm not sure I believe that netstandard2.1 defaults to 7.3. Did they not add all the fancy features to 2.1?
Currently we default to C# 7.3 (because that's what D2L uses). I think this should probably be configurable at the workspace level.