有一个关于 GAC 的快速问题,
我创建了一个程序集 Awesome.DLL。已签名,然后安装到 GAC 中:
C:\MyApps\Awesome\Awesome\Awesome\bin\Release>sn -k Awesome.snk
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Key pair written to Awesome.snk
C:\MyApps\Awesome\Awesome\Awesome\bin\Release>gacutil /i Awesome.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
C:\MyApps\Awesome\Awesome\Awesome\bin\Release>gacutil /l Awesome.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Number of items = 0
我的问题:
C:\Windows\Assembly
在任何子文件夹中都找不到 Awesome.DLL 。找到了,尽管C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\
我猜正因为如此,我无法从 Add Reference > .Net 中看到 Awesome.DLL。
为什么不安装到C:\Windows\Assembly\
?我怎样才能指向那个位置呢?