I fixed my own problem by understanding how the static files are "copied".
In my case I had to copy the static files into wwwroot (top level folder of the project). Right click (each file) > properties and set the Build Action to Content.
When the NuGet package is created these files should then be in the staticwebassets folder.
You can check this locally (win 10) C:\Users{username}.nuget\packages\unitedgroup.blazor\1.0.1\staticwebassets
When you reference the package in your consuming code it will serve up the content as usual - just make sure you have the path right (all explained in the original post above)
If I've added to the confusion - apologies.
If it helps in your situation - cool.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi
Great and detailed post.
I have one question - how do the entries appear in the StaticWebAssets.xml file in the first place.
<ContentRoot ...
I have a folder with a sub folder that contains my wwwroot and a .js file in it.
The entry is not appearing
I fixed my own problem by understanding how the static files are "copied".
In my case I had to copy the static files into wwwroot (top level folder of the project). Right click (each file) > properties and set the Build Action to Content.
When the NuGet package is created these files should then be in the staticwebassets folder.
You can check this locally (win 10) C:\Users{username}.nuget\packages\unitedgroup.blazor\1.0.1\staticwebassets
When you reference the package in your consuming code it will serve up the content as usual - just make sure you have the path right (all explained in the original post above)
If I've added to the confusion - apologies.
If it helps in your situation - cool.