Skip to content

ASP.NET Core Razor projects do not build with latest CLI + VS16.2-preview1 #10218

@NTaylorMullen

Description

@NTaylorMullen

Roslyn looks to have inserted new bits into VS that expect this NullableContextOptions to be Nullable (see the change). The problem is the CLI currently uses a Roslyn that only understands NullableContextOptions. Therefore, if I fix one I break the other.

To fix this we'll need to ensure Roslyn inserts their bits and then immediately after we insert ours to ensure that things work inside and outside of VS. Roslyn has to insert their bits first to enable us to build, therefore I imagine things will be broken for a tiny bit of time? @natemcmaster you have more expertise on how we've handled changes like this in the past. Going to start an email thread about this offline.

Tracking VSTS issue that was the starting point to finding this failure: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/891963

CLI Version: 3.0.100-preview6-011867
VS Version:
image

1>------ Build started: Project: RazorTest, Configuration: Debug Any CPU ------
1>C:\Program Files\dotnet\sdk\3.0.100-preview6-011867\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(157,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
1>C:\Program Files\dotnet\sdk\3.0.100-preview6-011867\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.Compilation.targets(156,10): error MSB4064: The "NullableContextOptions" parameter is not supported by the "Csc" task. Verify the parameter exists on the task, and it is a settable public instance property.
1>C:\Program Files\dotnet\sdk\3.0.100-preview6-011867\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.Compilation.targets(120,5): error MSB4063: The "Csc" task could not be initialized with its input parameters.
1>Done building project "RazorTest.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

image

/cc @rynowak @mkArtakMSFT @natemcmaster

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions