Cannot view code changes in a web project unless I restart Visual Studio!

Yan Moura 96 Reputation points
2021-11-01T19:08:51.473+00:00

So, this is not the first time it happens but it's getting worse...

I am working on a web based in a package called "AspDoteNetStoreFront" and every page of the site is customizes through XMLPackage files (xml.config). For whose is not aware it's not a big deal, it's basically a HTML/XML page able to execute XPATH and XSLT scripts.

But the real problem has nothing to do with this. Whenever I have to test my web project I just right-click the project name in VS and choose the option "View in browser" and everything is fine.

Then let's say I decided to change one of the pictures of the main page. Then I change the picture, change the name in the source code, save and... nothing changes! Also nothing takes effect: I tried to clean up the browser cache, reload the page with F5 and ctrl+F5 and even close the browser and reopen the project viewing from VS. I checked the page source and the name of the picture that show up in the code remains being the name used when I "view in browser" the first time. It gives me the impression as if Visual Studio had a cache of the project files (I don't know if this is the case) and it just insists to use those cached versions and ignore all my code changes.

The ONLY thing that takes effect is to close VISUAL STUDIO, restart it and reopen my project. Then when I right click the project name and choose "view in browser" it will show up the latest changes. But if I try to make another change all the nightmare starts over and the only fix will close VS, etc, etc. Who can works this way?

I have no idea what's going on or how to fix it. There is someone out there that could put a light over that?

PS: We use TFS.

Thanks!

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,580 questions
{count} votes

Accepted answer
  1. Yan Moura 96 Reputation points
    2021-11-01T23:06:45.703+00:00

    I figured it out. It's hard to explain to who has zero experience with AspDotNetStoreFront though. But I will try.

    So I realized that the ONLY XML package where the issue was happening was the home (main page). Then after to realize it was a bit easier to narrow down the issue. Anyway, the AspDotNetStoreFront coders did things in a way that the home page contents should stay in a database record and not in an external package. But I didn't like it and decided to put it externally to be able of editing it in Visual Studio instead to use the StoreFront admin to paste the code into a form rich text window (that is the way they want us to do).

    In the same admin there is a button to reset the cache of the site (the cache they use to speed up things). Long story short clicking this button did the trick. The only thing I really don't know if why I don't need to click this button when I make changes in ALL other XML packages and only in THIS one. Anyway, the issue was solved and it was not VS at the end.

    0 comments No comments

0 additional answers

Sort by: Most helpful