Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

issue using Css Isolation in Blazor Server

$
0
0

We are using .net 8 and want to use css isolation.

So in my program.cs file I have:

var builder = WebApplication.CreateBuilder(args);builder.WebHost.UseStaticWebAssets();.....app.UseStaticFiles();...

I then create a local css file associated to a page and then in the head section of app.razor I place:

<link rel="stylesheet" href="_content/[MyAssemblyName].styles.css" />

Through explorer I can see that within the solutions

obj\Debug\net8.0\scopedcss\projectbundle there is a file [MyAssemblyName].bundle.scp.cssWhen I run my project, and look at the dev tools, I see a 404 error relating to my file. Opening the file I can see my isolated Css


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>