-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Dotnet watch browser refresh configurable port #50629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This PR is targeting |
Thanks for your PR, @@wes-sleeman. |
@dotnet-policy-service agree |
@dotnet/domestic-cat |
@wes-sleeman All Watch stuff goes to @tmat, so we'll wait for him to chime in. Thanks for making your contribution! We're technically still open for SDK-level changes for a couple more weeks, so it's possible this could make it to .NET 10. That would require a backport (which we can trigger) once this merges - since It's very unlikely that we would backport this to 8.x or 9.x SDKs without a really compelling customer use case, or some kind of external partner to justify the work + ongoing maintenance. The SDK is mostly a fix-forward kind of component for features - majorly-impactful bug fixes and security updates are the main category of thing that would be backported. |
@baronfel, thanks for the quick reply! Would enjoy this making it into .NET 10 as this has been a blocker for me leveraging .NET with my team at work (enough to make me file this PR in my spare time!), so happy to hear there's a chance on that. |
Add an environment variable to permit deterministic and user-controlled selection of the browser refresh port when using the hot reload feature of
dotnet watch
.This PR adds a new environment variable named
DOTNET_WATCH_AUTO_RELOAD_WS_PORT
to provide the other half of the functionality provided byDOTNET_WATCH_AUTO_RELOAD_WS_HOSTNAME
. This is particularly useful in situations such as container-based development workflows as it allows for specific port forwarding rules to be hard-coded in advance.First-time contribution, so any tips on how I can get this backported as far as we usually support would be appreciated.
Closes dotnet/aspnetcore#33823