Clean Up ASP.NET and Visual Studio Cache and Temp Files
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.
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]%).
The temporary files generated by Visual Studio after creating and running an ASP.NET application reside in:
%SYSTEMROOT%\Microsoft.NET\Framework\<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.
This folder is located in each users local settings folder:
The Visual Studio backup folder never gets cleaned out automatically, so you should periodically delete all files and folders under this directory.
%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.
This folder is normally associated with WPF or Silverlight development so the same might not exist on your machine.