drw 1.0.0

dotnet tool install --global drw --version 1.0.0                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local drw --version 1.0.0                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=drw&version=1.0.0                
nuke :add-package drw --version 1.0.0                

dotnet-remote-watch

NuGet Badge AppVeyor Badge DotNet Badge License Badge

Turns dotnet watch into a client-server model, so that the server (watcher) and the client (App) do not have to be run in the same host.

The primary intended use case is to run dotnet watch inside a dev container, and have the client run on the host, which does not necessarily have the .NET SDK/runtime installed. Hot-reloading Windows desktop apps (e.g., WPF, WinUI) with dev containers is now possible.

With some custom port forwarding, it should be possible to hot-reload an application on a remote machine or container.

Installation

dotnet tool install --global drw

Usage

  1. Add the following section to project file:

    <Import Project="$(RemoteWatchTargets)" Condition="'$(RemoteWatchTargets)' != ''" />
    
  2. Launch server:

    dotnet remote-watch
    

    remote-watch is supposed to be used in the same way as dotnet watch and it will launch and forward all arguments to dotnet watch after initialization.

  3. Launch HotReload.Client generated in the output directory. It will launch the target App after connecting to remote-watch.

  4. Update source code and observe the changes.

Environment variables

  • DOTNET_HOTRELOAD_PORT: The port to use for the client-server communication, default is 3000.

MSBuild

Consider setting the following MSBuild properties in the project file or environment variables:

  • SelfContained: Set to true so that the client can run on an environment without the .NET SDK/runtime installed.
  • RuntimeIdentifier: Set the target runtime identifier if it's different from where the watcher runs.

How it works

remote-watch intercepts the named pipe connection between dotnet-watch and Microsoft.Extensions.DotNetDeltaApplier.dll (injected into the target application via StartupHooks). The server forwards the intercepted data to HotReload.Client through a TCP connection (tcp://localhost:$DOTNET_HOTRELOAD_PORT), and HotReload.Client forwards the data to the target application through another named pipe.

Note that the internal implementation of dotnet-watch may change in the future.

dotnet watch

dotnet-watch

dotnet remote-watch

dotnet-remote-watch

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.0 239 4/7/2024
0.1.2 198 3/30/2024