You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NullableContextOptions has no effect anymore (after upgrading to VS 16.2 Preview 1?) #3256
Despite having set NullableContextOptions to enable in the project file, I receive the warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' context. on the String? question mark character.
Similarly, another project cannot be compiled anymore due to CS8627: A nullable type parameter must be known to be a value type or non-nullable reference type. Consider adding a 'class', 'struct', or type constraint. when using T? for a generic class type method parameter:
When adding #nullabe enable to the top of the file(s) causing the warning, it is gone. It's like the project element lost its functionality after upgrading to VS 16.2.0? I did not change the SDK preview version and could compile the same sources correctly in 16.1.0.
NullableContextOptions was renamed to just Nullable in dotnet/roslyn#35516. @jcouv, am I reading dotnet/roslyn#35716 correctly that the task should currently accept both in 16.2.0-preview1, but only the new property is respected by CoreCompile?
Do we have guidance for folks who are in this situation where they have dotnet on an older compiler/targets and VS on a newer one? Should it just be
<Nullable>enable</Nullable>
<NullableContextOptions>$(Nullable)</NullableContextOptions><!-- Remove after SDK 3.0-preview6 -->
Thanks for letting me now, it works now as expected with Nullable, I didn't find information that it was renamed (again), but kinda suspected it.
I also wonder which project is responsible for adding those tags to auto completion in the csproj file, as all those new tags don't appear there in VS 2019 16.2 which I tried to check first?
Activity
rainersigwald commentedon May 22, 2019
NullableContextOptionswas renamed to justNullablein dotnet/roslyn#35516. @jcouv, am I reading dotnet/roslyn#35716 correctly that the task should currently accept both in 16.2.0-preview1, but only the new property is respected byCoreCompile?Do we have guidance for folks who are in this situation where they have
dotneton an older compiler/targets and VS on a newer one? Should it just beRayKoopa commentedon May 22, 2019
Thanks for letting me now, it works now as expected with
Nullable, I didn't find information that it was renamed (again), but kinda suspected it.I also wonder which project is responsible for adding those tags to auto completion in the csproj file, as all those new tags don't appear there in VS 2019 16.2 which I tried to check first?
rainersigwald commentedon May 22, 2019
That currently lives in an XSD file in MSBuild. I filed dotnet/msbuild#4391.
Update dependencies from https://github.com/dotnet/cli build 20191021…