Cum Grano Salis

That annoying c:\windows\assembly folder

If you are anything like me, you want to tear your hair out and smash your head on a concrete wall with embedded rusty nails everytime you need to use Explorer (and any file-open dialog box) on the c:\windows\assembly directory.

While I am still working with my therapist on these issues, I decided to be a bit more proactive and see how many system files I need to delete for me to be able to see the assembly directory properly in explorer. I decided to go about it in a systematic way and only stop after deleting boot.ini. Luckily, I didn’t get that far.

There is only one file that needs a'mucking.

Do the following:

1. In console, type "cd /d %windows%\assembly
2. Type: "attrib -r -h -s desktop.ini"
3. Type "ren desktop.ini desktop.bak"

Voila, explorer will allow you to go through the REAL directory structure.

Note that sometimes it's useful to just have it in the original view, such as when you are a masochist or if you just want to drag&drop assemblies and let the GAC figure out where they belong. For that, simply do step 3 in reverse (ren desktop.bak desktop.ini).

Hope you find that as helpful and as soothing as I did.

P.S. This will work for other folders as well, such as the c:\windows\fonts directory etc.

s

Published Monday, October 03, 2005 12:02 AM by Shahar
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Ron Krauter said:

Thank you sir! Always wanted to do this.
October 3, 2005 12:33 AM
 

Matthew Mastracci said:

Try this too:

cd /d %windir%\assembly
attrib -r -h -s desktop.ini
mkdir gacview
move desktop.ini gacview
attrib +s gacview
attrib +r +h +s gacview/desktop.ini

Keeps your old view around (just in case).
January 3, 2006 3:50 PM
 

Jason Taylor said:

Your therapist needs to stop you from looking on your computer where you aren't supposed to look!  Curiosity killed the cat you know.
August 2, 2006 10:22 AM
 

Princess julie said:

This may seem really stupid, but I was wondering why you would even want to use Explorer c:\windows\assembly directory... Im just curious, and also, what IS this directory for?  Im researching everything c:\windows (beginner tech)

thanks!

October 25, 2006 6:01 PM
 

Shahar said:

The assembly folder contains .NET assemblies that are potentially shared accross applications. There are other benefits for putting assembleis there - search for "GAC .NET" for more information.

The reason you want a classic explorer view on these is that the structure of these directories is kind of complex and the names of the dirs/files potentially long. This makes using a command prompt to handle files in there somewhat annoying in some cases.

October 25, 2006 6:05 PM
 

mangomama said:

Does it realy need to be so big. i have  my windows folder over 1.5 gig now this makes me feel bad on my smal computor. can i clean somethings out of there. it is 158 mb and the M.net folder is 127mb

What is this fore..

November 13, 2006 1:57 PM
 

Will said:

Yeah I wish Mangomama, since mine is 456 MB (479,015,039 bytes). :(

December 2, 2006 8:31 PM
 

marek. said:

Yeah i wish both Mangomama and Will.. since mine is 2,1 GB.. :( and the WINDOWS\Installer get close to 2GB too :( with the pagefile of 1,5 GB and the hibernation file 1 GB i just blew off 7 GB for 'nothing'.

btw: anyone knows if it is safe to delete the file from Windows\Installer ?

Thanks

December 16, 2006 12:16 PM
 

Lois Lane said:

Re C:\WINDOWS\assembly

Is the DreamweaverCtrls.dll file supposed to be in this folder so that Dreamweaver can work with ASP.NET

I am having issues with DataGrid in Dreamweaver 8 while using ASP.NET 2.0

January 12, 2007 5:05 PM
 

Prasenjit Biswas said:

1. Open Regedit, browse to HKLM\Software\Microsoft\Fusion.

2. Add a REG_DWORD value named 'DisableCacheViewer'; set it to 1

3.             open an Explorer window and type in C:\WINDOWS\assembly\GAC_MSIL\

February 5, 2007 11:30 AM
 

Xunil said:

If your are only curious of what is in the folder,use the IceSword.The size can be set in the way of resize cache.

March 23, 2007 11:09 PM
 

Fábio said:

Can´t you just compress the damn thing ( mine is "only" 231 Megs, but I´m sure thinking about compressing the annoying "little" bastard ) ? Does anybody know how it would affect performance ? Oh, by the way, is .NET really worth it ? Can it really do something that amazing in order to justify the allocation of so much disk space ? Since my good old days of DOS programming, I always thought that MicroSh.t development tools are really buggy ( not to mention slower, chubby and some more adjectives I can´t really remember right now ) so I always preferred Borland or other stuff. Can´t we just put a fracking limit to little Bill´s byte hunger ( i.e., limit the size of the pitiful thing ) ?

June 26, 2007 1:11 AM
 

Shahar said:

On new HDs, 231 Megs is 0.07% of the hard drive space. That's less than one tenth of one percent. On laptops, that's 0.3% of the hard drive space.

It's not a matter of amazing or not. There's some software that will just not work if you dont have it, period. Remove it, but expect that some software will not work.

And dont feel too bad. On my machine it's 463Megs.

June 26, 2007 1:53 AM
 

Quinton said:

OK... here goes. My %^$$$% assembly folder is over 27 Gig!!! My entire drive is only 55Gig. I have about 233k space left on my drive to work with!!! I pulled my hair out about 2 weeks ago!!! How is it possible that so much space is waisted with this stupid folder??? Does anyone know if it is safe to purge some of this crap?

July 11, 2007 6:33 AM
 

Spudbert said:

Why is this thing hidden.  I came across it doing a Rootkit scan, and I just about wet my pants when the screen filled up.  I was certain I my computer was enslaved by a spammer until I found this column.

Thank you for these postings.

July 14, 2007 4:09 PM
 

Mugol said:

So, can somebody tell us is it safe enough to just compress the /assembly folder ??

August 20, 2007 9:26 PM
 

Shahar said:

This is not an OFFICIAL answer, but I dont think anything bad can happen if you use NTFS to compress the folder.

August 21, 2007 10:22 PM
 

Jim Bauer said:

I have an old copy of DOS's DR directory tool from PC Magazine. In a DOS window it acceses the entire Assembly directory, no tricks or anything, just good old dos, sure looks different then what expolorer shows....

December 17, 2007 3:17 PM
 

Donat said:

Try using ExplorerXP... (www.explorerxp.com)

It enables you to view things in ALL folders... even "C:\System Volume Information"!

I am by no close or remote way related to this software. I'm just very happy using it

January 25, 2008 7:47 AM
 

Ash said:

TILL NOW NO ONE HAS REPLIED IF IT IS SAFE TO DELETE THIS IDIOT c:\windows\assembly folder.

February 12, 2008 5:17 AM
 

Steve said:

I'm in the same boat, my C: drive is at 0kbs and my c:\windows\assembley folder is 5.4 gbs, it was under 5gbs about 2months ago... really annoying as I managed to free up 1gb last night and now theres nothing...

Please, if somebody can help with this issue, I'm sure many of us will sleep better!

S

February 22, 2008 4:55 AM
 

Shahar said:

It is unsafe to delete this folder.

You are better off moving your page file/some program files into your D drive.

One example of how you can do that is to take large applications/games, uninstall them and reinistall them on a different drive - most applications will retain their settings.

Do this at your own risk though.

February 22, 2008 2:42 PM
 

Yogee said:

I was very annoyed with bad exploring ability of the folder. There is no good way of searching assembly there. I wrote a tool here,

http://gacbrowser.sourceforge.net/

Hope it will solve problem of searching assembly.  also, it removes assemblies with "traced reference problem". I would love to add "backup" option for removed assembly in future..

February 28, 2008 7:08 AM
 

Mike Dempsey said:

The 'Assembly' directory is not the only one Explorer screws around with.

It also hides the DLLCache directory so that you can not replace 'system' dlls with different versions - something you sometimes need to do when debugging a customer problem.

One solution to this is to dump Windows Explorer altogether and use a real file manager like the one in Norton NT Tools. Unfortunately Symantec no longer sell this product, but if you can find a copy it works very well ... and gives you a lot of other useful features that Microsoft dont provide.

I use this product 99.9% of the time. (even though it is 12 years old!) The one problem that forces me to use Explorer (temporarily) is when I  need to copy a file and the space in use is close to a 4GB boundary. (In 1996 there was no support for drives larger than 4GB so the app thinks my 120GB drive is full.)

One more warning - if you are one of those strange folks who actually likes to store all their files under 'My Documents', that is also a 'fake' directory ... so you have to navigate to the 'real' directory instead - about 3 levels down from the top ... so not very convenient.

April 2, 2008 6:18 PM
 

Jelani said:

You can also map a drive directly to your GAC and then you'll be able to see the actual directory structure.

Go into command prompt and type:  subst z: %windir%\assembly\gac

I got this info from http://weblogs.asp.net/jkey/archive/2003/02/25/3006.aspx and am *very* thankful.

April 9, 2008 12:24 AM
 

TK said:

^^That was easy!!

Thanks Jelani!

May 29, 2008 1:24 PM
 

Anthony said:

Maybe the growing size of the assembly folder is because of the temp and tmp subfolders.

BTW, assembly is compressed in my system and have no problem (168 MB, but 98.4 compressed).

What about the Installer folder? Can be emptied? If a program needs the installer files, can I provide them when needed or the program will crash? Must I have the installers in this folder 'just in case'?

July 28, 2008 7:10 AM
 

Pierre from Paris said:

I just checked the file viewer in InfoFind (http://www.omnicognic.com/) and it displays the structure of [C:\WINDOWS\assembly] and even lets you quickly filter through it. Normally I just use InfoFind for Oracle and SQL Server Database Queries and Reports but it has a number of system utilities and a file viewer too.

August 14, 2008 8:48 PM
 

Mike said:

Thanks Jelani that is def the easiest way to do it.

October 3, 2008 3:57 PM
 

Ivan Wilson said:

Regarding the SUBST command that Jelani suggested, I had to modify mine slightly. This may be because I'm running on x64 (Windows 2008)

My command is subst z: %windir%\assembly\gac_msil

November 2, 2008 1:21 AM
 

Alex said:

You've all been talking about how Windows Explorer can't view some files/folders such as C:\System Volume Information but if you go to (in Windows Explorer) Tools > Folder Options (click, (window opens)) > View (click) > (in the "Advanced Settings" box) "Hidden files and folders" > "Show hidden files and folders" (click) (then just a bit below that) > "Hide protected operating system files (Recommended)" (uncheck box) (then a window opens asking if you are sure that you want to show protected operating system files) > (Hit YES!) Then you will be able to see files and folders like "C:\System Volume Information".

I would also like to know why that the "C:\WINDOWS\ASSEMBLY" folder keeps growing I know that the folder and the files it contains has something to do with .NET but what exactly do they do?

November 16, 2008 2:58 AM
 

frex said:

I foolishly tried to install Roxio's Creator 2009 and after 5 unsuccessful attempts ended up with a frozen PC.

Upon furter investigation, I discovered that it had loaded 270M of stuff into my Windows\Assembly folder that I presume they need to make their "stuff" work.

After recoving from the freeze, I uninstalled the Roxio crap and decided that I didn't need all that Windows\Assembly stuff hogging up space on my PC.

As everyone who has read your blog knows now, these new files are not visible to the Windows explorer.

I started writing a Visual Basic app that would allow me to delete the new files, but it became more work than I wanted to get into.

Therefore I did as suggested by renaming desktop.ini in the Windows\Assembly folder, copied all the junk files to a CD for safe keeping and then deleted them all.

Thanks, I'm back to where I was before purchase of the useless $100 Roxio Creator 2009.

December 27, 2008 11:37 AM
 

mino said:

LOL, I just LOL on somebody thinking about visual basic program to bypass Explorer :D

Get a real file manager and be done with it. (i.e.Total Commanede, Servan Salamnder, etc., etc.)

March 6, 2009 1:16 PM
 

VbNetMatrix said:

Mino, that's because you're a C++ Troll.

Vb6 is as good as anything and you can do as much as any language.

sometime slower that's true and something are harder to do (ex.: multi thread)

by the way, I DID made a Vb6 program to show that assembly directory.

in wasn't on purpose, I was doing a search file and directory program, and I notice that the directory count was higher then what windows/property show.

I started to investigate and even applying all the trick said here, there is 2 directory that will NOT be showed... although my Vb6 program does it.

smile...

March 20, 2009 5:38 AM
 

VbNetMatrix said:

Alex: I didn't found that box to uncheck, did you applied some registry hack to show it ?

I'm using WinXp Pro

March 20, 2009 5:41 AM
 

Flachschippe said:

As has been said before, the WINDOWS/assembly directory implements the .NET Global Assembly Cache:

http://en.wikipedia.org/wiki/Global_Assembly_Cache

It grows every time software is installed that brings along a shared assembly, similar to shared DLLs installed in other system directories.

It may also grow every time that .NET compiles CIL code to native machine code and caches the compiled result (in the NativeImages* subdirectory).

I assume that the NativeImages* subdirectory can be safely deleted (because they can be recreated from the GAC* directory contents), but have not tried this.

April 12, 2009 12:40 PM
 

DaneBrooke said:

This didn't work for me (Win2K).

May 8, 2009 6:59 PM
 

Rogerio M. Souza - From Brazil (souzarm@caixapostal.com.br) said:

Try XYplorer (www.xyplorer.com) for direct display.

XYplorer: best of the  best "Windows File Manager and Explorer Replacement"

(...)

XYplorer is a multi-tabbed dual pane file manager for Windows, featuring a powerful file search, a versatile preview, a highly customizable interface, and a large array of unique ways to efficiently automate frequently recurring tasks. It's extremely fast and light, it's innovative, and it's fun!

(...)

September 26, 2009 8:41 AM
 

scraps said:

if you really want to clean up your hard disk and don't know what you are doing, just use the disk cleanup in

start>programs>accessories>system tools

then run disk defrag

December 2, 2009 5:50 PM
 

Charles Steppp said:

Well knowing what can and can't be whacked is important to me, since

I'm a cheap B@#$@# with 5 daughters and a bunch of flash drive based

netbooks. I've been backing up whole directories from my microscopic

c: to my merely small d: and then putting shortcuts on C: pointing back.

PIA!!!

December 5, 2009 2:19 PM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker