Skip to content

Commit 7318395

Browse files
author
N. Taylor Mullen
committed
React to Roslyn rename of NullableContextOptions to Nullable.
- Verified the fix with VS16.2-preview2 + latest CLI with modified `Nullable` entry on disk - Updated tests. - Note: This change will not pass the build until we have a new CLI that has an updated Roslyn that understands `Nullable`. dotnet/aspnetcore#10218
1 parent d510f43 commit 7318395

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Razor/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Compilation.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Copyright (c) .NET Foundation. All rights reserved.
153153
NoLogo="$(NoLogo)"
154154
NoStandardLib="$(NoCompilerStandardLib)"
155155
NoWin32Manifest="$(NoWin32Manifest)"
156-
NullableContextOptions="$(NullableContextOptions)"
156+
Nullable="$(Nullable)"
157157
Optimize="$(Optimize)"
158158
Deterministic="$(Deterministic)"
159159
PublicSign="$(PublicSign)"

src/Razor/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIntegrationTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ public async Task Build_CSharp8_NullableEnforcement_WarningsDuringBuild_BuildSer
629629
{
630630
var result = await DotnetMSBuild(
631631
"Build",
632-
"/p:LangVersion=8.0 /p:NullableContextOptions=enable");
632+
"/p:LangVersion=8.0 /p:Nullable=enable");
633633
var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");
634634

635635
Assert.BuildPassed(result, allowWarnings: true);
@@ -644,7 +644,7 @@ public async Task Build_CSharp8_NullableEnforcement_WarningsDuringBuild_NoBuildS
644644
{
645645
var result = await DotnetMSBuild(
646646
"Build",
647-
"/p:LangVersion=8.0 /p:NullableContextOptions=enable",
647+
"/p:LangVersion=8.0 /p:Nullable=enable",
648648
suppressBuildServer: true);
649649
var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");
650650

0 commit comments

Comments
 (0)