No executable found matching command "dotnet-watch"
If You get error like this: No executable found matching command "dotnet-watch" This is solution.
1. Check if You have csproj inside directory of command execution
2. Check if there is a reference to the "watcher" tool in the project file (csproj)
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0"/>
</ItemGroup>
and then execute
dotnet restore
Call background thread
I think the most Gentleman's approach to call background method is Threadpool.
public void TheGentlemansApproach()
{
// straight onto the threadpool - what could be better?
ThreadPool.QueueUserWorkItem(_ => BackgroundMethod("The Gentleman's Approach"));
}