Dotnet watch / hot reload doesn't seem to work at all. Any ideas? Or am I just doing something wrong?
Program.cs:
while(true)
{
Thread.Sleep(1000);
Console.WriteLine("a");
}
Then on the command line:
dotnet watch
dotnet watch Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
Press "Ctrl + R" to restart.
dotnet watch Building...
Determining projects to restore...
Restored xxx.csproj (in 91 ms).
test -> xxx/bin/Debug/net7.0/xxx.dll
dotnet watch Started
a
a
a
(etc)
As expected. Then change "a" to "b" in the above and get this output:
dotnet watch ⌚ File changed: ./Program.cs.
a
dotnet watch Hot reload of changes succeeded.
a
a
a
(etc)
Notice it's still outputting "a" not "b".
I'm running macOS and from the standard command line. The csproj file looks like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
TIA.