Closed jsheely closed 1 year ago
@tmat can you please investigate this? Thanks!
Thanks for contacting us.
We're moving this issue to the .NET 8 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
While I still think this may be important to have this option for folks migrating from Razor to Blazor.
I believe the roadmap plan that @danroth27 has illustrated in the Blazor Community Standup .net 8 updates solves my end goals.
I just want to mix server and client components using the same programming model
@jsheely What do you mean by Hot Reload "not working" in the last step?
I tried to repro updating the project to include the project reference while dotnet watch
was running and it requested app restart:
dotnet watch ⌚ File changed: .\RazorPages1.csproj.
❔ Do you want to restart your app - Yes (y) / No (n) / Always (a) / Never (v)?
❔ y
After restarting changes I made to Index.cshtml were applied correctly.
Do you mean that Hot Reload shouldn't restart the app when project changes?
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
Hi @jsheely. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.
Is there an existing issue for this?
Describe the bug
Simply adding a reference from a Razor pages project to a blazor wasm project will break razor pages ability to hot reload the page.
It appears that the
Microsoft.NET.Sdk.BlazorWebAssembly
project reference is doing something that hijacks the hot reloadingTwo notable differences
_framework/aspnetcore-browser-refresh.js
code but there does not appear to be an easy way to override this logic and keep hot reloading working. See: https://github.com/dotnet/aspnetcore/issues/44805dotnet watch
terminal output changesBefore
After
I've created a demo repo. Simply add the un-comment the project reference in the
RazorPages1.csproj
for thewasm.csproj
and change something in the Razor Index.cshtml before and after the reference changeUsing
dotnet watch
and I also trieddotnet watch --project .
because I saw that somewhere during debuggingExpected Behavior
I expect that changing the Razor Index.cshtml would hot reload the page just as it did before the web assembly project reference was added.
Steps To Reproduce
dotnet watch
in the Server folderExceptions (if any)
No exceptions
.NET Version
8.0.100-preview.3.23178.7
Anything else?
I've tried this with .net 7 with the same result.
The goal of this is to create a template that has support for Server side static rendering with "Blazor Pockets" of interactivity for either the Blazor Server or Blazor Wasm in any pocket chosen. Both environments supporting hot reloading.