MSB4220: Waiting for the currently executing task "Copy" to cancel
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
I can reproduce the issue - Build won't finish dotnet/extensions#1406 ( https://github.com/dotnet/sdk/issues/9034 ) . This issue is still not fixed. Today I have installed fresh copy of VS 2022 version 17.5.1 Professional (64-bit) licensed edition in my organization computer. I was observing this issue for last 15 days recurrently and it was wasting my time like anything. Today i used process explorer to monitor what is going wrong and also started build using commandline dotnet build command with detailed logged enabled.
My observations are -
- Build keeps executing CopyToOutputDirectory action to copy apphost.exe from obj folder to bin folder for infinite amount of time. We cancel the build by Build -> Cancel option or control+c then onwards MSBuild stuck infite with error - MSB4220: Waiting for the currently executing task "Copy" to cancel. [ project name ].
- There are 3 MSBuild.exe running. First cancel stops/kills 1 MSBuild.exe
- 2 MSBuild.exe still running and then error starts coming on screen - MSB4220: Waiting for the currently executing task "Copy" to cancel
project type - asp.net core web api
.net version - 6.0 sdk
VS version - VS 2022 version 17.5.1
### Expected Behavior
Build should not hang if it fails to copy the files, there should be some timeout and then throw exception notifying user of details. Right now i let it wait and build keeps waiting for hours ( i let it run overright and checked in the morning, it was still waiting for the copy operation to finish).
### Steps To Reproduce
I can reproduce the issue - Build won't finish dotnet/extensions#1406 ( https://github.com/dotnet/sdk/issues/9034 ) . This issue is still not fixed. Today I have installed fresh copy of VS 2022 version 17.5.1 Professional (64-bit) licensed edition in my organization computer. I was observing this issue for last 15 days recurrently and it was wasting my time like anything. Today i used process explorer to monitor what is going wrong and also started build using commandline dotnet build command with detailed logged enabled.
My observations are -
- Build keeps executing CopyToOutputDirectory action to copy apphost.exe from obj folder to bin folder for infinite amount of time. We cancel the build by Build -> Cancel option or control+c then onwards MSBuild stuck infite with error - MSB4220: Waiting for the currently executing task "Copy" to cancel. [ project name ].
- There are 3 MSBuild.exe running. First cancel stops/kills 1 MSBuild.exe
- 2 MSBuild.exe still running and then error starts coming on screen - MSB4220: Waiting for the currently executing task "Copy" to cancel
-
project type - asp.net core web api
.net version - 6.0 sdk
VS version - VS 2022 version 17.5.1
### Exceptions (if any)
_No response_
### .NET Version
6.0
### Anything else?
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.