When deployed .net core hosted Blazor app is served from myserver.com/myapp.
I've set <base href="/myapp/" />
in index.html and it works when published.
To avoid changing it all the time manually I tried to follow official documentation on Path Base and to add:
"commandLineArgs": "--pathbase=/myapp"
or"commandLineArgs": "--pathbase=/"
even"commandLineArgs": "--pathbase="
in launchSettings.json
.
I've tried putting it in all configuration profiles but for some reason it does not work when debugging. It can't find resources.
I've also tried running from console: dotnet run --pathbase=/myapp
but no luck.
EDIT: --pathbase=/myapp
works for stand alone Blazor apps, but not for ASP.NET Core hosted one. At least not out of the box.
Is there a way to pass this config from "Server" to "Client" or to tell to the "Client" to use it in debug mode?