dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.19k stars 9.93k forks source link

Use vdir environment variable when injecting browser refresh script #39762

Open pranavkm opened 2 years ago

pranavkm commented 2 years ago

Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1437972?src=WorkItemMention&src-action=artifact_link

Environment variable to use: ASPNETCORE_AUTO_RELOAD_VDIR

ghost commented 2 years ago

Thanks for contacting us.

We're moving this issue to the .NET 7 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.

robi26 commented 1 year ago

Hi, any update on this issue? We're having several blazor apps and development is a bit annoying because of these missing features. thanks

javier01123 commented 1 year ago

I'm also experiencing this issue :/

raynebair commented 1 year ago

All of our applications are built using virtual directories and this is a very annoying issue. Are there any workarounds for this?

robi26 commented 1 year ago

@mkArtakMSFT any news on this item? This is really impacting our dev cycle. Thanks

PS: if there is a workaround, please let me know.

robi26 commented 1 year ago

any update?

ghost commented 11 months ago

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.

lsomchai commented 10 months ago

When launching Blazor Server with IISExpress with an app path in AppURL, such as http://localhost:5279/apppath, the browser refresh script is inject the "/_framework/aspnetcore-browser-refresh.js" into Blazor WebAssembly Client (index.html) and fail to load. However, I found it at "/apppath/_framework/aspnetcore-browser-refresh.js". So, if the injection remove /, everything may be work well.

I have try to disable hot reload by adding "hotReloadEnabled": false in launchSettings.json. No injection of aspnetcore-browser-refresh.js and no error. However, when I change "hotReloadEnabled": true, no injection of aspnetcore-browser-refresh.js but error on the /_framework/blazor-hotreload.js file not found.

I think, this is a bug of injection at the root path. May be no need to set vdir environment.

valosharp commented 2 weeks ago

We experience the same issue, and it's really annoying, I hope it will be resolved soon.