Clearing the Visual Studio Web Cache

Working with Visual Studio 2008 on websites with other developers, I was continually annoyed by the message :-

Confirm Save To Web Server
A more recent version of the file [filename] has been saved to the Web server by [username] on [DateTime]

Do you want to replace the server file with your local file?

Yes/No

I didn't want to replace the server file with my local file. In fact, I wanted to update my local file with the one from the server if someone else had changed it!

This situation got steadily more annoying as more files were changed on the site, meaning that it took many clicks of "no" (would be nice to have had "no to all") just to exit Visual Studio (2008). This message appeared whether or not I had changed a file.

Extensive searching on the internet, within help files and looking at options did not reveal anything which helped me.

Finally, I pieced together the following which worked for me, and hopefully will work for you.

It appears Visual Studio (version 2008 at least) saves a local cache of files in the following folder :-
For Vista and Windows 7:-
C:\Users\%username%\AppData\Local\Temp\VWDWebCache\
For XP:-
C:\Documents and Settings\%username%\Local Settings\Temp\VWDWebCache\

Here you'll find a folder for each website you have opened to edit. Essentially, it is a cache of pages for each website. Whichever one is giving you the problem, delete it and the messages will stop!

I think an option to keep files cached or not should be made available in Visual Studio as I think other people must want to use it the same way as we do. Or an option to refresh the cache or delete it entirely would be a step in the right direction.

Hope that helps you, it took a while to get to the bottom of this, but as usual I found a solution!

Comments

  1. thanks man, that was driving me out of my mind. Nice of Miccrosoft to make it easy for us yet again.

    ReplyDelete
  2. Thanks! This worked for me too. It was VERY annoying.

    ReplyDelete

Post a Comment

Popular posts from this blog

Some Useful Videos About Cyber Security

The Power of Passwords: Why Words Trump Symbols

Ensuring Reliable Backups: Test Your System's Lifeline to Disaster Recovery