dotnet / dotnet/aspnetcore

`dotnet watch` with `aot` leads to unexpected behavior

Open
#36,579 1 comment 0 reactions 0 assignees View on GitHub
area-commandlinetools bug feature-hot-reload
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

1. Setup blazor wasm project with aot
2. Ensure the `wasm-tools` workload is **NOT** installed
3. Do `dotnet watch`

Expected: Error, missing workload, `dotnet watch` exits
Actual: Error, but `dotnet watch` is still running (and restarting) on file change, but dev server doesn't appear.

```
dotnet watch
watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. Press "Ctrl + R" to restart.
watch : Building...
Determining projects to restore...
/usr/local/share/dotnet/sdk/6.0.100-rc.2.21463.12/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools [/Users/tanay/dev/NoteTakingSample/NoteTakingSample.csproj]
/usr/local/share/dotnet/sdk/6.0.100-rc.2.21463.12/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload install wasm-tools [/Users/tanay/dev/NoteTakingSample/NoteTakingSample.csproj]
watch : Waiting for a file to change before restarting dotnet...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.