Skip to content

After update to Blazor 0.8 library _content missing #7451

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

Closed
sven5 opened this issue Feb 11, 2019 · 2 comments
Closed

After update to Blazor 0.8 library _content missing #7451

sven5 opened this issue Feb 11, 2019 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue

Comments

@sven5
Copy link

sven5 commented Feb 11, 2019

Describe the bug

In Blazor library it's impossible to load client side files from "magical" folder _content after update to .NET Core 3.0 Preview 2 and Blazor 0.8.

To Reproduce

Steps to reproduce the behavior:

  1. Using this version of ASP.NET Core '3.0.0-preview-19705-0444'
  2. Update Blazor library to use the following packages:

<ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Components.Browser" Version="3.0.0-preview-19075-0444" /> <PackageReference Include="Microsoft.AspNetCore.Components.Build" Version="3.0.0-preview-19075-0444" /> </ItemGroup>

Edit: Need to say that my Blazor App runs as a mapped sub-application:

app.Map("/Blazor", branchApp =>
{
	branchApp.UseStaticFiles();
	branchApp.UseRazorComponents<App.Startup>();
});

But this was no issue in 0.7.
This seems to be only an issue with Razor Components (server-side). In client side scenario (Blazor) it's working correctly.

Expected behavior

I expect the folder _content to be accessible and visible through debugging tools in the browser as it was with Blazor 0.7

Screenshots

As you can see in the following screenshot, the folder _content is not available.
image

Additional context

Add any other context about the problem here.
Include the output of dotnet --info

Host (useful for support):
Version: 3.0.0-preview-27324-5
Commit: 63a01b08e5

.NET Core SDKs installed:
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.503 [C:\Program Files\dotnet\sdk]
2.1.600-preview-009472 [C:\Program Files\dotnet\sdk]
3.0.100-preview-010184 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview-19075-0444 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27324-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview-27325-3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

@muratg muratg added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 11, 2019
@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @sven5.
We don't yet support content files in Razor Components. This is something on our backlog and we plan to address it in the future: #6349

@mkArtakMSFT mkArtakMSFT added ✔️ Resolution: Duplicate Resolved as a duplicate of another issue area-blazor Includes: Blazor, Razor Components labels Feb 11, 2019
@SQL-MisterMagoo
Copy link
Contributor

@sven5 Until the Microsoft team get this working, I have written a project that brings this functionality back for Razor Components BlazorEmbedLibrary
If you add this to your App, it will embed the static CSS and JS files at runtime into the head of your app using browser blob storage.
You might find it useful as a workaround.

@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants