Skip to content

[Blazor Wasm] Razor Class libraries static assets are not published in the dist folder #13103

@ghidello

Description

@ghidello

When publishing a Blazor Webassembly App referencing a razor class library the _content folder for the class library is created in the publish/wwwroot/ path instead of publish/ProjectName/dist/ along with all the other app files.

To Reproduce

  1. Create a default Blazor Webassembly App named TestBlazorApp
  2. Create a default Razor Class Library
  3. In the Blazor app add a reference to the class library, a reference to the component in the index.cshtml file and a reference to the css in the index.html file
  4. The component should render correctly with the development server
  5. Perform a dotnet publish and inspect the bin\Debug\netstandard2.0\publish\TestBlazorApp\dist: the _content folder is missing but is present at bin\Debug\netstandard2.0\publish\wwwroot\_content

Expected behavior

The static assets for a Razor class library should be published in the same folder of the the other assets of a referencng Blazor Webassembly app.

Additional context

The static assets are published correctly for a Blazor Server app.

dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview8-013656
 Commit:    8bf06ffc8d

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview8-013656\

Host (useful for support):
  Version: 3.0.0-preview8-28405-07
  Commit:  d01b2fb7bc

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssembly

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions