简体   繁体   中英

How to register DLL in the GAC?

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.

Here are two methods.

  1. Using the utility gacutil -i

    gactutil -ic:\\foldername\\assemblyname.dll

  2. The second method is you can drag the .dll file from the bin folder of the assembly and drop it into the folder C:\\%systemroot%\\Assembly

我还没有看过ArcGIS 10,但是我知道以前版本的ArcGIS的行为是,如果您在安装.NET之前安装了ArcGIS,则不会安装将DLL安装到GAC的功能。

If you have the SDK installed, you can use the gacutil command:

path "%WinDir%\Microsoft.NET\Framework\v1.1.4322";%Path%
gacutil /i "%ProgramFiles%\ArcGIS\DeveloperKit10.0\DotNet\framework.dll"

Note that you have to be an Administrator to alter the Global Assembly Cache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM