Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
dotnet build error - the project 'Web' must provide a value for Configuration #10336
Steps to reproduce
I run this command to build an aspnet core project(Web is the startup project)
dotnet build X.sln -c Release --no-cache --source "\\local_source\packages" --source "https://api.nuget.org/v3/index.json"
Build should be successful.
The same issue was raised by our TFS autobuild.
I get the following error right after the packages has been restored:
C:\Users\MyUser\.nuget\packages\microsoft.aspnetcore.razor.design\2.1.1\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(121,5): error : The project D:\Workspaces\X\src\Web must provide a value for Configuration. [D:\Workspaces\X\src\Web\Web.csproj]
.NET Core SDK (reflecting any global.json):
Host (useful for support):
.NET Core SDKs installed:
.NET Core runtimes installed:
To install additional .NET Core runtimes or SDKs:
I had this infuriating issue when migrating a .NET Core 2.2 app to core 3.0. The issue turned out to be that I was still referencing Microsoft.AspNetCore.Razor.Design Version="2.2.0" in the .proj file's package references. Deleting that reference (which isn't needed at all as Razor.Design is now part of AspNetCore library) fixed the issue.
Once I'd done that, I then got hundreds of errors about nullable objects being a new feature not compatible with razor. That was because I had