"dotnet build" fails: "Solution file error MSB4249: Unable to build website project"

Viewed 2775

Besides .net core 2.2 projects, my solution file contains a website project. When I am in Visual Studio and I run "Rebuild Solution" everything builds successfully, including the website.

In the build output, I see:

>Validating Web Site
9>Building directory '/e2e/'.
9>Building directory '/node_modules/.bin/'.
... etc ...

But it I try to run "dotnet build" (v3.1.200) from the folder containing the solution file, it fails with this error:

Solution file error MSB4249: Unable to build website project "ClientApp". The ASP.NET compiler is only available on the .NET
Framework version of MSBuild

How can I build my solution from the command line?

[Does Visual Studio run "dotnet build" to build the solution"? If so, with what arguments?]

0 Answers
Related