C
C#2y ago
Pokey

Blazor WASM - Hosted Services During Debug

Hi there, I have a hosted service which I would like to run during debug in order to watch and hot-compile my SASS stylesheets. Because this is a hosted service, adding it to the Program.cs isn't particularly useful as this runs in the browser, so no watching for my SASS files takes place. Is there a way, during debug, to run the hosted service on the "server side" (in the IDE) so that my SASS files get hot compiled?
2 Replies
undisputed world champions
not sure i understand, but when you create a new blazor wasm project, you can check the "ASP.NET Core hosted" option the template will create the usual wasm project, but also a "usual" server-side asp.net core project, that serve the blazor app, but can also contain controllers, etc maybe that can help you?
Pokey
Pokey2y ago
I suppose that would work, but that is a LOT of overhead for something I just want to run during debug. I have looked at ways to run another external tool during debug too, but to no success there either