Rob Kraft's Software Development Blog

Software Development Insights

Clean up all the old versions of DLLs on your development PC

Posted by robkraft on December 24, 2010

Sometimes I desire to clean up all the old copies of my DLLs from my computer in order to insure that I am testing the correct and current version.
Using the great tool “Search Everything” from VoidTools.com, I have found that I often have a lot of detritus in the following folders:
1) The Global Assembly Cache (GAC)
1a) In .Net 2.0, I could find the GAC at c:\windows\assembly and delete my files
1b) In .Net 4.0, the GAC is at C:\WINDOWS\Microsoft.NET\assembly in multiple sub-folders
2) The temporary ASP.Net file cache
2a) This is located at a folder with a name like C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
3) If you develop with Silverlight, then you may find a history of every version of Silverlight DLL file you created at:
C:\Documents and Settings\%loggedInUser%\Local Settings\Application Data\assembly\dl3
4) Clear your browser cache
5) Look for DLLs in all of your bin and obj folders.  “Search Everything” is great for this purpose.

I clean up much of this with a batch file like this now:

cd “C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files”
rd /S /Q root
rd /S /Q vs

c:
cd “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files”
rd /S /Q root
rd /S /Q vs

c:
cd “C:\Users\rkraft\AppData\Local”
rd /S /Q temp

c:
cd “C:\Users\rkraft\AppData\LocalLow”
rd /S /Q temp

c:
cd “C:\Users\rkraft\AppData\Local\Microsoft\VisualStudio\12.0\Designer”
rd /S /Q ShadowCache

c:
cd “C:\Users\rkraft\AppData\Local\Microsoft\VisualStudio Services\5.0\”
rd /S /Q Cache

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: