C
C#6mo ago
Mozzarella

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
No description
𝗝𝗮𝗺𝗲𝘀
Is there any message when you attempt to hot reload? Like asking you to rebuild?
No description
𝗝𝗮𝗺𝗲𝘀
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
Mozzarella
MozzarellaOP6mo ago
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,
wwwroot/
index.html
wwwroot/
index.html
gets copied to
bin/wwwroot/
index.html
bin/wwwroot/
index.html
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
Mozzarella
MozzarellaOP6mo ago
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)
#if DEBUG
Environment.CurrentDirectory = @"..\..\..\..\src\RPAIntegrator";
#endif
#if DEBUG
Environment.CurrentDirectory = @"..\..\..\..\src\RPAIntegrator";
#endif
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
Mozzarella
MozzarellaOP6mo ago
wait
𝗝𝗮𝗺𝗲𝘀
that should help you with that just make sure you put up the correct path did it work? @Tabarnak
Mozzarella
MozzarellaOP6mo ago
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
Mozzarella
MozzarellaOP6mo ago
I know..and everybody in company they say they do the same thing 😦
Want results from more Discord servers?
Add your server