-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Blazor WebAssembly dotnet watch run --pathbase=/ doesn't work in .NET 8 #52294
Blazor WebAssembly dotnet watch run --pathbase=/ doesn't work in .NET 8 #52294
Comments
@tmat is this something you've potentially changed? I don't recall us making any changes in this area during .NET 8. |
Working: Not working: |
To learn more about what this message means, what to expect next, and how this issue will be handled you can read our Triage Process document. |
Hot Reload is disabled when running the above command line with SDK 7:
We no longer disable it with SDK 8. A workaround is to explicitly disable Hot Reload
|
I ran into this recently. I have .Net 7 Blazor app that is working on my MacOS system (via VSCode), and I attempted to update to .Net 8 by installing the 8.0.2 SDK and then changing the csproj file to update the framework and WebAssembly versions, and I was getting the same error message. So I deleted the bin and obj folders completely and tried again and found that a "dotnet run" allows the "https://localhost:7035/" URL to invoke my code, but a "dotnet watch" reports the "The server is configured only to handle request URIs within the PathBase '/SMaLL'." error! And is I append "/SMaLL" to the URL then all resources report 404 error! At least I can use the run command, but it is a pain to have to kill and restart with each code change, as I was able to use watch before. |
Is there an existing issue for this?
Describe the bug
Hi, after the latest update to .NET 8, I discovered that the
--pathbase
flag is not working as it should. In the previous version, the app was served from the specified path, but in the new version, it is being ignored. I am using this option to debug my Blazor Extension in Azure DevOps as I need to specify a different path than the default one. The command I am using is:Then the app is served from /dist folder, and I can access my app and debug easily using hot reloading. At the root level, I get this message: "The server is configured only to handle request URIs within the PathBase '/dist'." On .NET 8, this flag is simply ignored, and the app is served from the default path.
Expected Behavior
I expected the app to run from specified path with the
dotnet watch run --pathbase=path
command after updating to .NET 8, like it did before. But now, the flag isn't working, and the app runs from the default path instead.Steps To Reproduce
To reproduce the issue, launch a Blazor WebAssembly project using the command dotnet watch run --pathbase=/dist and observe whether the application is served at the specified path ('/dist' in this case).
Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
No response
The text was updated successfully, but these errors were encountered: