Actually, it is BEYOND the hot reload feature. There are times where even after closing and opening the editor again, where my changes are not god damn applied.
@Tao Sun The problem seems to occur when i try to edit my CSS stylesheet. The code below is what i have in my stylesheet and when i change the background color, it does not change it, even after restarting the my Rider IDE. #recipe-image-style{ width: 50%; border-radius: 5px; }
I have made sure that it links to the stylesheet, and even tried it in Visual Studio Community, where it works just fine. It even updates without me saving or after pressing the Hot Reload button is VSC. The below picture shows a snippet of the stylesheet that i am editing, where i just change the background color. I have my entire project up on my Github: https://github.com/LegendsAndreas/kitchen-app, in case you want the whole code.
You should use dotnet watch in this situation. Change static resources in Blazor apps cannot be reflected by hot reloads till restart, it's limited by the way Blazor works.
Please have a look at this blog to set the dotnet watch on editing the project.
And the documentation from MS about using dotnet watch.
Tao Sun Okay, it appears to be working now, thanks! Also, the blog is a little outdated, as the plugin already comes pre-installed with Rider, which made me really confused when i didn't find it in the plugin store.
Also, is there a reason why this is not implemented as the default? Seems to be just a straight up upgrade from however the http/https/ISS Express configuration works.
Basically that's the same in most use cases if you are working on Blazor. The dotnet watch is a feature only supported in .NET6.0 and after versions.
Rider has its own hot reload mechanism implementation, it supports hot reload on debugging.
Rider hot reload will monitor Roslyn changes on debugging. If the change is “rude” and requires restarting the target application, Rider will notice and reattach the debugger. dotnet watch will not do that.
Another historical reason is hot reload was deleted from dotnet watch previously. We have to create our own implementation at the moment. If you are interested in this topic, have a check on this GitHub issue.
Could you please provide a reproducible example or code snippet of the issue? We would help to investigate the problem further.
Tao Sun Currently studying, but i will get back to you when i have the time.
@Tao Sun The problem seems to occur when i try to edit my CSS stylesheet. The code below is what i have in my stylesheet and when i change the background color, it does not change it, even after restarting the my Rider IDE.
#recipe-image-style{
width: 50%;
border-radius: 5px;
}
#recipe-details{
border-radius: 5px;
background-color: yellow;
}
I have made sure that it links to the stylesheet, and even tried it in Visual Studio Community, where it works just fine. It even updates without me saving or after pressing the Hot Reload button is VSC. The below picture shows a snippet of the stylesheet that i am editing, where i just change the background color. I have my entire project up on my Github: https://github.com/LegendsAndreas/kitchen-app, in case you want the whole code.
You should use
dotnet watch
in this situation. Change static resources in Blazor apps cannot be reflected by hot reloads till restart, it's limited by the way Blazor works.Please have a look at this blog to set the dotnet watch on editing the project.
And the documentation from MS about using dotnet watch.
Tao Sun Okay, it appears to be working now, thanks! Also, the blog is a little outdated, as the plugin already comes pre-installed with Rider, which made me really confused when i didn't find it in the plugin store.
Also, is there a reason why this is not implemented as the default? Seems to be just a straight up upgrade from however the http/https/ISS Express configuration works.
Basically that's the same in most use cases if you are working on Blazor. The dotnet watch is a feature only supported in .NET6.0 and after versions.
Rider has its own hot reload mechanism implementation, it supports hot reload on debugging.
Rider hot reload will monitor Roslyn changes on debugging. If the change is “rude” and requires restarting the target application, Rider will notice and reattach the debugger.
dotnet watch
will not do that.Another historical reason is hot reload was deleted from
dotnet watch
previously. We have to create our own implementation at the moment. If you are interested in this topic, have a check on this GitHub issue.