sdk: `dotnet watch` broken in `8.0.100`
Describe the bug
The dotnet watch command is broken in 8.0.100. Apparently it prefixes the input command with run.
To Reproduce
Run a command like:
dotnet watch build --project src/Backend --verbose -- /t:RunFunctions
In the verbose output it is clear that run is prefixed to the command:
...
dotnet watch ⌚ Running dotnet with the following arguments: 'run build /t:RunFunctions'
dotnet watch 🚀 Started '/usr/local/share/dotnet/dotnet' 'run build /t:RunFunctions' with process id 34887
...
Where as with 7.0.404 it is correct:
...
dotnet watch 🚀 Started '/usr/local/share/dotnet/dotnet' 'build /t:RunFunctions' with process id 34847
dotnet watch ⌚ Running dotnet with the following arguments: build /t:RunFunctions
...
Further technical details
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6c33ef20
Runtime Environment:
OS Name: Mac OS X
OS Version: 13.6
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/8.0.100/
.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.
Host:
Version: 8.0.0
Architecture: arm64
Commit: 5535e31a71
.NET SDKs installed:
7.0.404 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
x64 [/usr/local/share/dotnet/x64]
registered at [/etc/dotnet/install_location_x64]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 4
- Comments: 15 (7 by maintainers)
Sorry about that - I was copy/pasting too quickly this morning. The proper tracking issue is https://github.com/dotnet/sdk/issues/34949. I’ll edit my incorrect message in-place as well.
i have pushed my update to dotnet8 -branch here, which demonstrates the problem:
https://github.com/TomasEkeli/WebApiStart/tree/dotnet8
it is a devcontainer -setup from the dotnet7 devcontainer which installs dotnet8 as a post-create -step.
navigate to
/workspaces/NewProject/src/Backend.Teststo observe the bugdotnet testruns all the tests (logs some failures, but that’s expected, all tests are ok)dotnet watch testjust builds (and runs?) and watches for file-changes.cc @baronfel
edit: it works fine on the
main-branch, which is still on dotnet7FYI it seems both reports are non-Windows