Time to Clean Up! Why is it that over time, any machine you buy just seems to get slower and slower? Well, I am sure you can chalk some of it up to perception, as your time gets squeezed more and more by work demands and personal demands. However, there are other factors at work on your computer that periodically need your attention. Of course, there are the obvious things you can do to speed up a machine such as adding more RAM or getting a faster CPU, but there are a few tuning things you can do within the OS and on your hard drive that can make a dramatic difference in the speed of your computer. As a developer, you need to pay attention to what Visual Studio and .NET do to your computer as well. This article will share some ideas on how to maintain a good development machine. | " | As a developer, you need to pay attention to what Visual Studio and .NET do to your computer…
| " |
Yes, .NET and Visual Studio are great for development, however, as you run, compile, and debug with Visual Studio and .NET, they will often leave a lot of little “packages” all over. I can think of a few locations on your hard drive that you should check to see if you have left-over folders or files that you can delete. I have attempted to gather as much data as I can about the various versions of .NET and operating systems. Of course, your mileage may vary on the folders and files presented in this article. As part of this article, I’ll include a handy little WPF application that will show you the list of folders that you might wish to clean up on a regular basis. Figures 1 and 2 show examples of what this application will report back to you depending on your operating system. The WPF application is a VS.NET application, with source code, that you can download from the CODE Magazine website. I am sure you will find this utility handy in helping you clean up the folders as described in this article.  Figure 1: List of folders to clean up on Windows Vista. Figure 2: List of folders to clean up on Windows XP Service Pack 3.Each operating system will store temporary files in different folders. The problem is that the files are not always temporary. Sometimes these files do not get cleaned up like they should. Read below for a description of each folder that you should review periodically and delete files within. Temporary ASP.NET Files As you create and run ASP.NET applications, the ASP.NET runtime places files into a special folder located under your “Windows” folder in <sysdrive>:\Windows\Microsoft.NET\Framework[64]\ <vernum>\Temporary ASP.NET Files
You can remove the folders and files within this folder 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. IIS will sometimes keep files it uses in this folder, so run iisreset to release these files so you can delete them. | " | Do not remove the "Temporary ASP.NET Files" folder itself, just the folders underneath this folder.
| " |
Website Cache This folder is similar to the ASP.NET Temporary Files folder in that it contains files from running ASP.NET applications. You can find this folder in each user’s Local Settings folder but the exact location will vary a little depending on the operating system. For example on Windows Vista, the folder is located at: <sysdrive>:\Users\<UserName>\AppData\Local\ Microsoft\WebsiteCache.
Windows XP users can find this folder at: <sysdrive>:\ Documents and Settings\<UserName>\ Local Settings\Application Data\Microsoft\ WebsiteCache
Check these locations periodically and delete all files and folders under this directory. VS.NET Backup VS.NET uses a backup folder to store temporary files while you develop in Visual Studio. VS.NET doesn’t clean this folder out, so you should periodically delete all files and folders under this directory. On Windows XP, you can find this folder located at: <sysdrive>:\Documents and Settings\<UserName>\ My Documents\Visual Studio 200[5|8]\Backup Files
On Windows Vista you’ll find this folder located at: <sysdrive>:\Users\<UserName>\Documents\ Visual Studio 200[5|8]\
Assembly Cache No, this is not the global assembly cache (GAC). It appears that this cache is only created when doing WPF or Silverlight development with VS.NET 2008. On a Windows Vista machine, you’ll find this folder in: <sysdrive>:\ Users\<UserName>\AppData\Local\ assembly\dl3
On Windows XP, look for this folder at: <sysdrive>:\ Documents and Settings\<UserName>\ Local Settings\Application Data\assembly
If you have not done any WPF or Silverlight development, you may not find this particular folder on your machine. | & | | 
By: Paul Sheriff
Paul D. Sheriff is the President of PDSA, Inc. (www.pdsa.com), a Microsoft Partner in Southern California. Paul acts as the Microsoft Regional Director for Southern California assisting the local Microsoft offices with several of their events each year and being an evangalist for them. Paul has authored several books, webcasts, videos and articles on .NET, SQL Server and SharePoint. Paul can be reached via email at PSheriff@pdsa.com or at Paul Sheriff's Inner Circle (www.PaulSheriffInnerCircle.com).
PSheriff@pdsa.com | Fast Facts | | Visual Studio leaves temporary files in various locations on your hard drives. To ensure a well-running development environment, know where these files are, and periodically delete them. | |
|