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

谁都会走 提交于 2019-11-27 18:04:55

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

This is because the assembly you are installing into the GAC was compiled targeting the 4.0 runtime. 4.0 GAC assemblies are stored in a different location c:\windows\microsoft.net\assembly.

The accepted answer is incorrect. Using the .NET 4.0 gacutil to install an assembly compiled targeting 3.5 or earlier runtime works just fine, and will place the assembly in the directory the OP was expecting, c:\windows\assembly.

The path is -> C:\Windows\Microsoft.NET\assembly\GAC_MSIL where all the assemblies are stored for .net 4.0 version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!