You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dotnet watch command is an essential tool, especially for people working with non VS IDEs.
However, currently there is no way to modify the command arguments, which do start the process with the dotnet watch command if the DOTNET_WATCH env var is set, but also includes the --no-hot-reload option.
(Added in #515)
Introducing an annotation-based configuration would streamline the process, allowing developers to specify the dotnet watch behavior, especially the hot-reload option.
Proposed API
+ public sealed class DotnetWatchAnnotation(bool enableHotReload) : IResourceAnnotation+ {+ public bool EnableHotReload { get; } = enableHotReload;+ }
The .WithArgs() method could be overloaded, to allow to override the default options.
Currently the arguments just get appended at the end of the command.
Risks
The API change would not introduce any breaking changes
The text was updated successfully, but these errors were encountered:
No news. Thanks for submitting the API design proposal. One of the factors impacting this is that we are starting to look at adding the ability to stop and restart resources within the app model (where applicable). I can imagine that this will have impacts on things like hot reload.
So, this will likely be in a holding pattern until we figure that out. It might render this unnecessary and its best not to have two ways of doing things if we can avoid it.
Background and Motivation
The dotnet watch command is an essential tool, especially for people working with non VS IDEs.
However, currently there is no way to modify the command arguments, which do start the process with the dotnet watch command if the DOTNET_WATCH env var is set, but also includes the --no-hot-reload option.
(Added in #515)
Introducing an annotation-based configuration would streamline the process, allowing developers to specify the dotnet watch behavior, especially the hot-reload option.
Proposed API
Usage Examples
Alternative Designs
The .WithArgs() method could be overloaded, to allow to override the default options.
Currently the arguments just get appended at the end of the command.
Risks
The API change would not introduce any breaking changes
The text was updated successfully, but these errors were encountered: