Skip to content

dotnet build does not return to console when an error aborts the build process #13925

@lauxjpn

Description

@lauxjpn

Steps to Reproduce

On a Windows 10 development machine, that is using a macOS build host, build a project file that is designed to produce a build error (e.g. by putting an <Error Text="This is a build error." /> task in a target):

dotnet build -p:ServerAddress=192.168.0.3 -p:ServerUser=username

Expected Behavior

The error is shown and the dotnet.exe process returns to the console.

Actual Behavior

The error is shown but the dotnet.exe process does not return to the console.
No thread of the dotnet.exe process does any (significant) work.
Pressing Ctrl+C does not return to the console either.
Terminating the dotnet.exe process works of course.

Environment

Using iOS workload 15.2.100-preview.12.5 and .NET 6.0.200-preview.22053.5 on both machines.
I had the same issue with 15.0.101-preview.11.551 previously as well.

.NET SDK (reflecting any global.json):
 Version:   6.0.200-preview.22053.5
 Commit:    118f8629ac

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\PathToSolution\.dotnet\sdk\6.0.200-preview.22053.5\

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  3.1.201 [C:\Program Files\dotnet\sdk]
  3.1.416 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  5.0.404 [C:\Program Files\dotnet\sdk]
  6.0.100 [C:\Program Files\dotnet\sdk]
  6.0.101 [C:\Program Files\dotnet\sdk]
  6.0.200-preview.22053.5 [C:\PathToSolution\.dotnet\sdk]

Build Logs

[...]

    38 Warning(s)
    34 Error(s)

Time Elapsed 00:01:00.88

Workload updates are available. Run `dotnet workload list` for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fixmsbuildIssues affecting our msbuild tasks/targetswindows-onlyThe issue only occur on Windows

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions