I have solution with couple .NET Standard projects in all I wanted to enable c# 8 and nullable like below:
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
Note: These settings are found in your .csproj file.
The problem is that some projects are compiling fine and some have error:
Invalid 'nullable' value: 'Enable' for C# 7.3. Please use language version 'preview' or greater
I have Visual Studio 16.2 Preview 2 and .NET Core 3 Preview 6. Is this a bug in preview or I'm doing something wrong?
<LangVersion>8.0</LangVersion>
, not<LangVersion>preview</LangVersion>
. See this page for how to specifypreview
,latest
, etc... – Davies8.0
too. Do you have aglobal.json
in those failing projects that points to an earlier SDK? – Vial