-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
dotnet watch
WebSockets port configuration for HotReload
#39608
Comments
Thanks for contacting us. We're moving this issue to the |
What determines whether Hot Reloads uses ws or wss? |
Did you find a workaround? Hot reload is unusable as it chooses a random port each time. |
It would be impossible to configure this with CspOptions ConnectSources custom sources for trusted domains if ports are always generated randomly! |
Also the domain doesn't have to be localhost, it could be something else |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
The year is 2023, and Microsoft still hasn't added an environment variable to prevent its random WebSocket port allocation... 🤦♂️ |
Closing as a dupe of #39765 |
@mkArtakMSFT you are closing in favor of a resent issue? why? that is the dupe not this one |
From https://github.com/dotnet/sdk/blob/1cbb60f4ad1a34415a8f360c90e92a70587bdb1b/src/BuiltInTools/BrowserRefresh/BrowserScriptMiddleware.cs#L49
We should configure static ports like this.
![image](https://user-images.githubusercontent.com/50224521/148306890-0d6cd9cb-2b94-49de-8543-c9f0cea6af26.png)
Then If you are a vscode remote developer you could just open those ports
![image](https://user-images.githubusercontent.com/50224521/148307028-71b873bd-493d-4819-b5e9-6c8612227162.png)
The text was updated successfully, but these errors were encountered: