{"id":6471,"date":"2014-04-18T06:52:13","date_gmt":"2014-04-18T06:52:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/18\/how-can-i-get-the-location-of-the-gac-using-c-collection-of-common-programming-errors-2\/"},"modified":"2014-04-18T06:52:13","modified_gmt":"2014-04-18T06:52:13","slug":"how-can-i-get-the-location-of-the-gac-using-c-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/18\/how-can-i-get-the-location-of-the-gac-using-c-collection-of-common-programming-errors-2\/","title":{"rendered":"How can i get the location of the GAC using C#?-Collection of common programming errors"},"content":{"rendered":"<p>There are absolutely valid reasons to access the GAC manually like a folder. Of course, one should be aware of the risk manipulating things there. But read-only access is quite ok, I would say.<\/p>\n<p>Besides the mentioned %windir%\\assembly, it might happen that Nir Sofer already did the job for you. He has written GACView.<\/p>\n<p>And hey, it even has a feature to disable the special view in Explorer: Options\/Disable Assembly Viewer in Explorer. The folder will then show up as a normal folder. While this worked well on Windows XP, it doesn&#8217;t on Windows 7 64 Bit, because it&#8217;s setting it in the 32 Bit version of the Registry. To disable the assembly viewer on Windows 7 64 Bit, start Regedit (64 Bit), go to<\/p>\n<pre><code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Fusion\n<\/code><\/pre>\n<p>and add a new DWORD called DisableCacheViewer with value 1.<\/p>\n<p>To be independent from the directory (which might change), you can enumerate assemblies via the Fusion Registry Key:<\/p>\n<pre><code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Fusion\\GACChangeNotification\\Default\n<\/code><\/pre>\n<p>I guess this is how GACView works internally. But it still won&#8217;t enumerate the .NET 4 assemblies in %windir%\\Microsoft.NET\\assembly.<\/p>\n<p>A tool which supports .NET 4 is GACBrowser, but it displays less information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are absolutely valid reasons to access the GAC manually like a folder. Of course, one should be aware of the risk manipulating things there. But read-only access is quite ok, I would say. Besides the mentioned %windir%\\assembly, it might happen that Nir Sofer already did the job for you. He has written GACView. And [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6471","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6471"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6471\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}