-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Describe the bug
After upgrading to .Net5.0 I noticed that when publishing (dotnet publish) a Blazor WASM project the StaticWebAssetBasePath is not taken into account.
The files inside wwwroot are not put in the specified base folder.
However, when the project is run, the framework files are correctly located.
I'm following this documentation about <StaticWebAssetBasePath>
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-5.0#hosted-deployment-with-multiple-blazor-webassembly-apps
To Reproduce
Run: dotnet new blazorwasm
Open the .csproj file
Add <StaticWebAssetBasePath>test</StaticWebAssetBasePath> inside <PropertyGroup>
Save & Run: dotnet publish
Look at the content of: bin\Debug\net5.0\publish\wwwroot
Current result: Most files are incorrectly located in wwwroot and some files are inside wwwroot\test
Expected result: All files (framework,css,...) should be inside wwwroot\test

I get the expected result when running the same steps with .NetCore 3.1 (dotnet new blazorwasm -f netcoreapp3.1)

Further technical details
- .Net 5.0
dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100\
Host (useful for support):
Version: 5.0.0
Commit: cf258a14b7
.NET SDKs installed:
5.0.100 [C:\Program Files\dotnet\sdk]
I ran the commands on the command line.