Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tmat
Copy link
Member

@tmat tmat commented Aug 26, 2025

To be redistributed by VS/VS Code project system.

Currently VS loads Microsoft.AspNetCore.Watch.BrowserRefresh.dll from the SDK, which requires the code on both sides to handle all combinations of supported versions of VS and SDK.
Loading the dll from VS will allow us to work with a single version.

Target middleware back to net6.0 as Hot Reload supports net6.0+ apps.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2559220

@tmat tmat marked this pull request as ready for review August 26, 2025 16:42
@tmat tmat requested a review from a team as a code owner August 26, 2025 16:42
@tmat
Copy link
Member Author

tmat commented Aug 26, 2025

@DustinCampbell ptal

@javiercn
Copy link
Member

@tmat How does loading the dll from VS change anything? You'll pick different dlls depending on the target framework?

@tmat
Copy link
Member Author

tmat commented Aug 26, 2025

You'll pick different dlls depending on the target framework?

We don't need different versions. The code is targeted to net6.0.
If we needed to multi-target to net11.0 in future we would just include both net6.0 and net11.0 in VS and pick the right one depending on the app TFM.

The important thing is that both sides of the client-server protocol (client: IDE, server: middleware) ship in the same product (VS or VS Code) and thus can be both updated at the same time without regard of any prior versions of VS or SDK.

@javiercn
Copy link
Member

@tmat thanks for the clarification.

At some point in 11.0 I would like us to revisit how the current BrowserRefresh injects things into the project (specially the JS script) as it has created a lot of headaches for us in the last couple of releases.

Ideally, we would want this functionality to better integrate with the existing infrastructure to extend Blazor/Razor/MVC, potentially participating from the build process.

Do you think moving the injection into VS will preclude us from doing that in any way?

@tmat
Copy link
Member Author

tmat commented Aug 26, 2025

Do you think moving the injection into VS will preclude us from doing that in any way?

On contrary, it will make it much easier.

@tmat tmat merged commit 7f299d3 into dotnet:release/10.0.1xx Aug 26, 2025
28 checks passed
@tmat tmat deleted the BrowserRefreshPackage10 branch August 26, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants