Skip to content

ctrl+c is not respected when --framework is passed to 'dotnet build' #11680

Closed
@RikkiGibson

Description

@RikkiGibson

Issue Description

ctrl+c normally cancels the build, but it doesn't do that when --framework <target-framework> is passed to the CLI. You have to just sit there until the build finishes.

Steps to Reproduce

  • Get yourself a chunky project, like, I dunno, one of the projects in this repo, or dotnet/sdk repo, or dotnet/roslyn.
  • Run a command similar to one of the following examples
    • dotnet build ./test/dotnet.Tests/ --framework net10.0 in dotnet/sdk
    • dotnet build ./src/Compilers/CSharp/Portable --framework net9.0 -t:rebuild in dotnet/roslyn.
  • Wait for the restore step to finish and the actual build to begin. Also, I think this won't repro if everything is up to date and rebuild is not specified, difficult to be certain though.
  • Hit ctrl+c while the build is underway.

Expected Behavior

Build is cancelled.

Actual Behavior

Build does not cancel, you either have to terminate the terminal process and its children, or sit there and wait.

Analysis

No response

Versions & Configurations

In Roslyn I am using dotnet 9.0.104
In SDK I am using dotnet 10.0.100-preview.3.25125.5

Metadata

Metadata

Assignees

Labels

Area: Terminal LoggerProblems with the livelogger/fancylogger/terminallogger -tl functionality.Priority:1Work that is critical for the release, but we could probably ship withouttriaged

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions