Skip to content

Blazor component library bug with Razor Components project #7300

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
stavroskasidis opened this issue Feb 6, 2019 · 2 comments
Closed

Blazor component library bug with Razor Components project #7300

stavroskasidis opened this issue Feb 6, 2019 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@stavroskasidis
Copy link

Describe the bug

The blazor component library (dotnet new blazorlib) is not working properly with razor components (blazor server side). Specifically the static files that are embeded in the library are not served when the page is loaded.

To Reproduce

Steps to reproduce the behavior:

  1. Using dotnet 3.0 preview 2 (3.0.100-preview-010184)
  2. dotnet new razorcomponents -o RazorComponents1
  3. dotnet new blazorlib -o RazorComponents1\BlazorLib1
  4. dotnet add RazorComponents1\RazorComponents1.App reference RazorComponents1\BlazorLib1
  5. Add the following code to RazorComponents1.App\Pages\Index.cshtml
    <Component1 />
  6. Add the following code to RazorComponents1\RazorComponents1.App_ViewImports.cshtml
    @addTagHelper *,BlazorLib1
  7. dotnet run --project RazorComponents1\RazorComponents1.Server
@danroth27
Copy link
Member

Thanks @stavroskasidis for reporting this issue! This is a known limitation with the Razor Components template in Preview 2, but we are tracking addressing this limitation with issue #6349

@danroth27 danroth27 added area-blazor Includes: Blazor, Razor Components area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels Feb 6, 2019
@SQL-MisterMagoo
Copy link
Contributor

@stavroskasidis
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
Projects
None yet
Development

No branches or pull requests

4 participants