Debugging & Hot Reload is Broken When App's Base Path is Changed #46809
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
feature-hot-reload
This issue is related to the Hot Reload feaature
Pillar: Dev Experience
Priority:1
Work that is critical for the release, but we could probably ship without
Milestone
Is there an existing issue for this?
Describe the bug
Debugging and hot reload is broken when app base path is changed in
index.html
andlaunchsettings.json
.Expected Behavior
Debugging and hot reload with a different base path should work
Steps To Reproduce
Repo reproducing problem here:
https://github.com/daytonjallen/HotReloadPathIssueRepro
App will fail to load due to exceptions from not finding blazor-hotreload.js etc:
Exceptions (if any)
blazor.webassembly.js:1
TypeError: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js)
$(String[] args) in C:\Users\dallen\source\repos\HotReloadPathIssueRepro\HotReloadPathIssueRepro\Program.cs:line 11---> Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
TypeError: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
at Microsoft.JSInterop.JSRuntime.d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.InitializeAsync()
at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHost.RunAsyncCore(CancellationToken cancellationToken, WebAssemblyCultureProvider cultureProvider)
at Program.
--- End of inner exception stack trace ---
.NET Version
7.0.200
Anything else?
Visual Studio Version: 17.5.0
The text was updated successfully, but these errors were encountered: