You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't really know if msbuild is the right place for this - but it seems somehow related to the build system of dotnet.
I have a nuget lib (created by myself) to hold several css files for use in multiple target projects (blazorwasm, blazor aswell as razor pages)
The css files are transpiled from scss by node/npm and then packed with a nuspec file. The problem I have now is that (especially tested with a blazorwasm target project) the files are copied when running dotnet publish but when using dotnet run the files are not served by kestrel. Although they are listed within staticwebassets.build.json. This, in my case, makes the app completely unthemed and ugly of course.
Does anyone have an Idea how to fix this? I read alot about app.UseStaticFiles() in the doc, but unfortunately this does not apply to blazorwasm (and did not work in blazor-server or razor pages app anyways)..
Help is very much appreciated, I'm stuck with this for days now :/
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I don't really know if msbuild is the right place for this - but it seems somehow related to the build system of dotnet.
I have a nuget lib (created by myself) to hold several css files for use in multiple target projects (blazorwasm, blazor aswell as razor pages)
The css files are transpiled from scss by node/npm and then packed with a nuspec file. The problem I have now is that (especially tested with a blazorwasm target project) the files are copied when running
dotnet publishbut when usingdotnet runthe files are not served by kestrel. Although they are listed withinstaticwebassets.build.json. This, in my case, makes the app completely unthemed and ugly of course.Does anyone have an Idea how to fix this? I read alot about
app.UseStaticFiles()in the doc, but unfortunately this does not apply to blazorwasm (and did not work in blazor-server or razor pages app anyways)..Help is very much appreciated, I'm stuck with this for days now :/
THX
nuspec used to create the nuget:
Program.cs of blazorwasm:
index.html of blazorwasm:
Beta Was this translation helpful? Give feedback.
All reactions