I create a new blazor hosted project, named foo, from the dotnet CLI:
dotnet new blazorwasm --hosted
I run the app with
dotnet run -c Release
The template app works correctly when requesting https://localhost:5001 (or 5000)
I then publish the app with:
dotnet publish -c Release
And then try to launch it with
dotnet Server/bin/Release/net5.0/publish/foo.Server.dll
I expect the app to lanch correctly. But I actually get a 404 response. Why is that ?
Notes:
- It was working properly few days ago.
- When publishing, we get the message "Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink". I don't think this has anything to do with my issue as it was working properly before.
- I'm on Windows 10, dotnet sdk version 5.0.102