I am cleaning up a bunch of visual studio projects / solutions from different sources, and there are an incredible amount of temporary files and temporary folders stored in each solution.
I am wondering what file types are safe to delete so that I can write a script to take care of the heavy lifting so there is less junk to push around when I am trying to get the whole folder structure organized and linked up to the proper shared file locations.
As far as I can see the following files and folders are temporary and can be safely deleted:
Files
- *.sdf
- *.sln.docstates
- *.suo
- *.upgradelogxml
- *.user
- *.vcxproj.filters
- *.sln.old
- *.suo.old
- UpgradeLog.XML
- *.wixproj.vspscc
- *.csproj.vspscc
- *.SCC
- *.ncb
- *.opt
- *.plg
- *.aps
- *.clw
Folders
- _UpgradeReport_Files (folder)
- ipch (folder)
- bin, obj, debug, release and other build output folders though there could be files copied into here during build...
- Backup, Backup1, etc...
I am not even sure what some of these file types really are, I just know they are re-generated when you open the solution - and I know there are many more file types that I have missed from older and newer versions of Visual Studio.
Are there any file types that should be preserved in the list above? If so, for what reason, and are there further file types that can be cleaned out without any serious side effects?
The overall idea is to minimize the size and complexity of the solution when it is to be migrated, moved or reorganized or otherwise shuffled around enough for this "solution fat" to be a serious performance and management problem.
Typically I see this problem if I need to check something into a new source control system, zip and send sample code by email or put third party or peer code into an existing hierarchy of shared folders and files.