Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, December 3, 2018 6:35 PM | 1 vote
How do I force Visual Studio 2017 to clear cache.
In development I am obviously making several changes but I have proved that when I test Visual Studio is not picking up the latest java scripts.
NJDR
All replies (4)
Tuesday, December 4, 2018 5:55 AM
Hi njdr,
Welcome to the MSDN forum.
What’s the cache do you mean? Usually, we can delete the folder C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\15.0_xxxx to clean up the VS local cache, then VS will start like the first startup after the VS installation, all sign in accounts and customized setting will be removed.
>> In development I am obviously making several changes but I have proved that when I test Visual Studio is not picking up the latest java scripts.
What’s your project type and could you please share more detail information about it?
Best regards,
Sara
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Tuesday, December 4, 2018 11:35 PM
I had already tried what you suggested which I had previously found on a thread:
https://github.com/Codealike/Codealike-KnowledgeBase/blob/master/clear-visual-studio-component-cache.md<o:p></o:p>
It didn't work as well as I hoped. Old versions of some components (.js files) were still picked up and the cache file was recreated each time I ran Visual Studio so it was never going to clear what version of what was being tested.
In the end I adopted the tedious approach of renaming and version numbering all the components that had been changed and everything worked perfectly. It is a chore but there doesn't seem to be an easier option. I had hoped that Visual Studio could be forced to fetch fresh copies of everything in the build. Presumably some stuff is cached by the browser, Chrome in my case. I had the same problem some time ago and solved it by clearing out all my browser history etc. That lost a few useful items so I wondered it there was a way of forcing Visual Studio to do it.
NJDR
Wednesday, December 5, 2018 3:07 AM
Hi njdr,
Thank you for your sharing and I'm so glad to hear that your issue is solved, sorry for this inconvenience.
Does your project is the ASP.NET type?
>>In the end I adopted the tedious approach of renaming and version numbering all the components that had been changed and everything worked perfectly.
How did you rename the version number?
Best regards,
Sara
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Wednesday, December 5, 2018 6:35 PM
I have lots of .aspx.vb files .aspx.cs files .jpg and .png images and several .html and .js files. The .js files were the problem (this time) so I just renamed the ones that had recently been changed to include "V01" in the name like so:
<script src="imglist2008V01.js"></script>
<script src="imglist2009V01.js"></script>
<script src="imglist2010.js"></script>
<script src="imglist2012V01.js"></script>
I am not aware of any more sophisticated method of source control. As an old IBM mainframe developer I never had to bother. The mainframe just executed exactly what you gave it.
It may sound a bit of a muddle but I have deliberately tried to use as many different techniques as I could. So far I have skipped using .php
NJDR