You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some additional info related to this. It looks like it might actually be MSBuild itself that is the problem. I have now also been able to reproduce the problem with .NET Framework MSBuild.exe. It appears that the problem combination is using -restore and -graph together.
Since dotnet build implicitly calls MSBuild with -restore but dotnet msbuild doesn't, this explains the original behavior I was seeing.
dontnet msbuild -restore -graph reports a 0 exit code as well.
Oh! This is a dupe of an already logged MSBuild bug that is being fixed right now in dotnet/msbuild#9461
That's good to hear! If I had realized the full scope of the problem when I opened the issue, I would have started at the MSBuild repo instead and maybe caught that myself.
Describe the bug
When
dotnet build -graph
is used to build a project that fails, the exit code stays 0 instead of being a non-zero value.dotnet msbuild -graph
correctly sets a non-zero exit code.To Reproduce
dotnet new console
Console.Wri teLine("Hello, World!");
)dotnet build
(exit code 1)dotnet build -graph
(exit code 0)dotnet msbuild -graph
(exit code 1)Exceptions (if any)
N/A
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: