标准文件夹浏览方式查看GAC的程序集内容

获取或查看,copy GAC的内容,我以前用的方式是:在dos下访问文件夹,并用命令copy,感觉很繁琐。

今天无意中发现Derik Whittaker以前的一篇博文中介绍这种简单的方式:

Hacking the GAC, How to enable standard directory browsing

Have you ever wanted to or needed to view the actual contents of the GAC?  Not just what is in the GAC, but actually grab the assemblies that are there? 

I know I have.  You may be asking WHY did you want to grab an assembly that is in the GAC.  2 reasons:

  1. I wanted to move a copy of the assmebly from one box onto my dev box.
  2. I wanted to reflect the the assembly to see how it was build to learn something.

Well, fortunately there is a way to do this.  It is a pretty simple registry hack that works wonders.

Here is how:

  1. Open RegEdit
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
  3. Right click in the viewer and add a new Binary Value
  4. Name your new Binary value DisableCacheViewer
  5. Double click your new entry and given it a value of 1 with Base Hexadecimal
  6. Click OK
  7. Navigate to C:\WINDOWS\assembly
  8. You should see the contents of the folder as sub folders, not the standard GAC Viewer

Hope this helps..... I would be sure to delete or rename this new value AFTER you are done playing around.

**** WARNING **** Any time you modify your registry, you do so at your OWN risk. 

Till next time,

posted @ 2008-07-07 23:13  代码乱了  阅读(1036)  评论(1编辑  收藏  举报