New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Clean Up ASP.NET and Visual Studio Cache and Temp Files

Description

Visual Studio leaves a lot of temporary files over a few locations on your hard drive. Some of the temporarily files are not actually temporary and the same should be cleaned up time to time.

Depending on the versions of Visual Studio, .NET framework, and the operation system the specific path to the temp folders and files may vary.

  

Solution

Below you can find the common places where the unneeded temp files are stored so you can clean them up.

For better reusability, all localization paths in this article start with a default Windows Environment Path Variable(%[VARIABLE]%).

Temporary ASP.NET Files

The temporary files generated by Visual Studio after creating and running an ASP.NET application reside in:

%SYSTEMROOT%\Microsoft.NET\Framework[64]\<vernum>\Temporary ASP.NET Files folder.

The folders and files under this folder can be removed with no harm to your development computer. Do not remove the "Temporary ASP.NET Files" folder itself, just the folders underneath this folder. If you use IIS for ASP.NET development, you may need to run the iisreset.exe utility from the command prompt prior to deleting any files/folder under this folder. IIS will sometimes keep files in use in this folder and iisreset will release the locks so the files/folders can be deleted.

Website Cache

This folder is located in each users local settings folder:

 %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

Visual Studio Backup

 %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\BackupFiles

The Visual Studio backup folder never gets cleaned out automatically, so you should periodically delete all files and folders under this directory.

Project Assemblies

 %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\[version number e.g. 17.0_e7f7d5e5]]\ProjectAssemblies

Such a folder is created for each project you have worked on.

Assembly Cache

 %USERPROFILE%\AppData\Local\assembly\dl3

This folder is normally associated with WPF or Silverlight development so the same might not exist on your machine.

See Also

In this article
Not finding the help you need? Improve this article