Visual studio 2022 community Jquery ,Js, html hot reload
Guys I have jquery javascript html css with asp.net core project ,that is bind together.. I need to relaunch Visual studio if I want the changes applied for frontend or need to go and put manually js html files in the Debug folder..is there anyway just apply changes without rebuilding and launching entire app?
13 Replies
When i worked with frontend and visual studio, it generally worked good with chrome and edge browsers, otherwise it was not possible to debug it correctly. Can i see what your project looks like?
there are some configurations within the IDE that may interfere with your development experience
Is there any message when you attempt to hot reload? Like asking you to rebuild?
There is also issues related to Blazor and compilation caching. That may not be your problem but i would strongly recommend for you to clear the cache files to see if the problem just goes away.
- Close your IDE and go to the project root folder
- Delete .vs folder
- Goto %AppData%/../Local/Microsoft/VisualStudio/17.0_{your_version}/ComponentModelCache
- Delete everything inside
the problem is that the js and html is in pure js and html
no blazor at all!
im assuming that reloading the page doesn't work, right?
the first thing that comes to mind is
when you compile,
gets copied to
therefore, no changes applied to wwwroot/index.html would be perceptible until next compilation.
Can you check if that's what causing the issue?
See if your bin folder has a wwwroot folder also, if there isn't any then goes the next guess
@Tabarnak i just realized a way to solve possibly solve it
yeah that is what exactly happening
It is!
how can I solve it?
here's what i do in my project. (first line of Program.main().cs)
when i change the work folder, it will now look the wwwroot at my project's directory, not the debug one
which was causing the issue
wait
that should help you with that just make sure you put up the correct path
did it work? @Tabarnak
Not actually:(
But it is not your problem it is my company repository problem
They hide configuration settings
You should probably contact your superior then
how are you supposed to develop blindfolded
anyway, i wish you only the best. Hopes you'll find a way to solve your problem. If you get endup stuck and don't know what to do, as crazy as it sounds, maybe starting from scratch will give you an understanding of where you have made a mistake
I know..and everybody in company they say they do the same thing 😦