From b724885f3898850620890751a29c881c2f92db5d Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Mon, 13 May 2019 21:23:50 -0700 Subject: [PATCH] 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`. aspnet/AspNetCoredotnet/aspnetcore-tooling#10218 \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/fee9c35bee9bafc55448f15363e569a17e5f6323 --- .../Microsoft.NET.Sdk.Razor.Compilation.targets | 2 +- .../netstandard2.0/Microsoft.NET.Sdk.Razor.Component.targets | 2 +- .../test/IntegrationTests/BuildIntegrationTest.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Compilation.targets b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Compilation.targets index aa36ef1d3e..bba60c4553 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Compilation.targets +++ b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Compilation.targets @@ -153,7 +153,7 @@ Copyright (c) .NET Foundation. All rights reserved. NoLogo="$(NoLogo)" NoStandardLib="$(NoCompilerStandardLib)" NoWin32Manifest="$(NoWin32Manifest)" - NullableContextOptions="$(NullableContextOptions)" + Nullable="$(Nullable)" Optimize="$(Optimize)" Deterministic="$(Deterministic)" PublicSign="$(PublicSign)" diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Component.targets b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Component.targets index 18a81a5046..73fb23e194 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Component.targets +++ b/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Component.targets @@ -220,7 +220,7 @@ Copyright (c) .NET Foundation. All rights reserved. NoLogo="$(NoLogo)" NoStandardLib="$(NoCompilerStandardLib)" NoWin32Manifest="$(NoWin32Manifest)" - NullableContextOptions="$(NullableContextOptions)" + Nullable="$(Nullable)" Optimize="$(Optimize)" Deterministic="$(Deterministic)" PublicSign="$(PublicSign)" diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest.cs b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest.cs index 5a144d2a9a..ae6eb18969 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest.cs +++ b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest.cs @@ -629,7 +629,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { var result = await DotnetMSBuild( "Build", - "/p:LangVersion=8.0 /p:NullableContextOptions=enable"); + "/p:LangVersion=8.0 /p:Nullable=enable"); var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs"); Assert.BuildPassed(result, allowWarnings: true); @@ -644,7 +644,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { var result = await DotnetMSBuild( "Build", - "/p:LangVersion=8.0 /p:NullableContextOptions=enable", + "/p:LangVersion=8.0 /p:Nullable=enable", suppressBuildServer: true); var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");