|Cleanup Temporary Files used by Visual Studio

When building an application, Visual Studio (along with IIS and SQL Server) creates and uses a lot of temporary files throughout your system.  Often times, when something is not behaving as expected, it can be caused by old temporary files stuck somewhere in your system.

To fix every possible scenario, I have created the following script to delete every feasible temporary file, so that you can relaunch your application and start anew.

IF EXIST "..\bin" (
RMDIR /s /q "..\bin\"

IF EXIST "..\obj" (
RMDIR /s /q "..\obj\"

IF EXIST "%LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ProjectAssemblies" (
ECHO Deleting Application Data Cache DEL /S /Q "%LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ProjectAssemblies\")

IF EXIST "%TEMP%" ( ECHO Deleting Temporary Files DEL /S /Q "%TEMP%\")

IF EXIST "%LOCALAPPDATA%\Microsoft\WebsiteCache" ( ECHO Deleting Website Cache DEL /S /Q "%LOCALAPPDATA%\Microsoft\WebsiteCache\")
IF EXIST "%LOCALAPPDATA%\Microsoft\WebsiteCache" ( ECHO Deleting Website Cache DEL /S /Q "%LOCALAPPDATA%\Microsoft\WebsiteCache\")

Just put everything above into a .bat file and run.

Happy coding!


To add a comment, please login or register.


C-Level Security: When your team uses military analogies, are they using the wrong narrative?
For years, I have bristled when people would use medieval military descriptions in an attempt to convey concepts within the Network Security business. Bastions, Firewalls, Moats, Drawbridges, Countermeasures; all of these descriptions give way to a more accurate and detailed explanation of what was really taking place.
Setup Point-to-Site VPN with Ubiquiti EdgeRouter
Learn how to setup a VPN with your Ubiquiti EdgeRouter.
Using a Lenovo P51 Laptop with an Airplane Power Supply
The Lenovo P51 Laptop comes with a huge 170 watt Power Supply. However, airplane power supplies provide a maximum of somewhere between 75-100 watts. If you plugin a power supply requiring more watts, the circuit breaker will short out and the power will stop flowing.
Turning Atlassian JIRA into a CRM
Here at Member.buzz, we use Atlassian JIRA to track our features, bugs, and incoming requests from users through our Support Site. So when it came to choosing a CRM, we wanted to find one that integrated nicely with the rest of our infrastructure.Our first thought was to try out some of the existing JIRA CRM plugins. Here are the ones we tried out:CRM for JIRAAtlas CRMKanoah CRMAlthough there were definitely some interesting features among these options, there was nothing substantial enough to make us want to choose a specific one. We wanted something simple, yet well-integrated into what we already had