I have tried many of different solutions/suggestions found in here, nothing seems to work. It is probably a minor thing, but I just can't see it
For simplicity, I try only focus on ONE css file in the question.
Once the nuget pack is created from the RCL, I pack it and load it into the Nuget Explorer and get this:
So there are static content. Then I add the nuget package to my Blazor WASM project and edit the index.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<base href="/" />
<!-- 3. party styles -->
<link rel="stylesheet" media="screen, print" href="_content/JOSTGO.Blazor.ComponentLibrary.Core/css/bootstrap.min.css" />
</head>
<body class="overflow-hidden">
<div id="app" class="vh-100 vw-100 d-flex flex-row">Loading...</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
</body>
</html>
This is the error I get:
I have not added the builder.WebHost.UseStaticWebAssets() in the host project, in the program file, as some says it is needed, some says it is not. But I have tried it and it made no difference.
I also created a RCL project in the solution to test, where I added a single CSS file. It worked fine.
Let me know if you need more info.
Seems it was a local cache issue. Here is how I fixed it:
nuget.exe locals all -clear
nuget.exe restore
Now my css files were referenced correctly.