如何在GAC中注册DLL?
我正在尝试使用加载 ESRI 的 ArcEngine 的 WindowsFormsHost 安装 C# WPF。
MSI安装程序给出了这个错误:
Unable to install. The app requires assembly ESRI.ArcGIS.Framework Version
10.0.0.0 to be installed in the GAC first
我已经安装了ESRI ArcEngine Runtime 10,它应该可以处理这类事情,但我想它并不完美。
在目标计算机上,文件 Framework.dll 位于文件夹:C:\Program Files\ArcGIS\DeveloperKit10.0\DotNet
中,但不在 c:\windows\ assembly
中代码>.
我右键单击程序集,然后单击“注册”进行注册,但这并没有解决我的问题。
I am trying to install a C# WPF with a WindowsFormsHost which loads ESRI's ArcEngine.
The MSI installer gives this error:
Unable to install. The app requires assembly ESRI.ArcGIS.Framework Version
10.0.0.0 to be installed in the GAC first
I already installed the ESRI ArcEngine Runtime 10 which is supposed to handle this sort of thing, but I guess it's not perfect.
On the target machine the file framework.dll is in the folder: C:\Program Files\ArcGIS\DeveloperKit10.0\DotNet
, but it's not in c:\windows\assembly
.
I right clicked on the assembly then clicked register to register but that didn't fix my problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这里有两种方法。
使用实用程序 gacutil -i
gactutil -ic:\foldername\ assemblyname.dll
第二种方法是您可以将
.dll
文件从程序集的 bin 文件夹中拖放到文件夹C:\%systemroot%\Assembly
中
Here are two methods.
Using the utility gacutil -i
gactutil -i c:\foldername\assemblyname.dll
The second method is you can drag the
.dll
file from the bin folder of the assembly and drop it into the folderC:\%systemroot%\Assembly
我还没有看过 ArcGIS 10,但我知道以前版本的 ArcGIS 的行为是,如果您在安装 .NET 之前安装了 ArcGIS,则不会安装将 DLL 安装到 GAC 的功能。
I haven't looked at ArcGIS 10 yet but I know previous versions of ArcGIS behaved that if you installed ArcGIS before you installed .NET it wouldn't install the feature that installed the DLL's to the GAC.
如果您安装了 SDK,则可以使用 gacutil 命令:
请注意,您必须是管理员才能更改全局程序集缓存。
If you have the SDK installed, you can use the gacutil command:
Note that you have to be an Administrator to alter the Global Assembly Cache.