Wednesday 31 May 2017

Gacutil.exe successfully adds assembly, but assembly not viewable in explorer. Why?

 C:\_Dev Projects\VS Projects\bmccormack\CatalogPromotion\CatalogPromotionDll\bin
    \Debug>gacutil /i CatalogPromotionDll.dll
    Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Assembly successfully added to the cache


That's because you use the .NET 4.0 version of gacutil.exe. 
It stores the assembly in a different GAC, the one in 
c:\windows\microsoft.net\assembly. Where all .NET 4.0 assemblies 
are stored. There is no shell extension handler for that one,
 the folders are visible as-is. You can have a look-see with 
 Windows Explorer, .you'll see the internal structure of the GAC
 folders. You shouldn't have any trouble finding your assembly back,
 the GAC isn't particularly complicated.If the assembly is intended
 to be used by an app that targets an earlier version of .NET then 
 you should use the .NET 2.0 version of gacutil.exe, stored 
 in C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin