When upgrading a ASPNET DotNet Core 2.2 to 3.1, you might get this error when compiling:
The project D:\Code Repositories\MyProject must provide a value for Configuration. MyProject C:\Users\username\.nuget\packages\microsoft.aspnetcore.razor.design\2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets
The hint is in there:
microsoft.aspnetcore.razor.design\2.2.0
Doing upgrading we no longer need to depend on the above package as it comes standard with 3.1, so we need to remove the reference in our .csproj file.
Simply remove this line:
and then rebuild, or you might have to close and reopen visual studio.