错误

错误:ESRIRegAsm.exe 错误:注册失败。 无法加载文件或程序集

Last Published: July 21, 2023

错误消息

When attempting to register or unregister an ArcObjects assembly created with a previous version of ArcObjects with version 10.3, the following error is returned:

"Registration failed. Could not load file or assembly 'Esri.ArcGIS.ADF.Local, Version=10.2.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified."

For example, assume that a managed COM assembly, classlibraryfor102.dll, is being registeretd that was created with 10.2 and execute the following command line to register it with 10.3:

C:\Projects\ClassLibFor102\bin\Release> "C:\Program Files (x86)\Common Files\ArcGIS\bin\esriregasm.exe" classlibraryfor102.dll /p:Desktop

The following error message is displayed:
[O-Image]

原因

The ESRIRegAsm.exe.config file distributed with 10.3 is wrong. It currently references 10.2.0.0 and not 10.3.0.0 for the assembly binding redirection elements.

解决方案或解决方法



  1. Download and unzip ESRIRegAsm.exe.config.zip to obtain a new copy of the ESRIRegAsm.exe.config file. Replace the existing file with this new version.

    The default install location of the existing config file is:

    • For 64-bit Windows operating systems: C:\Program Files (X86)\Common Files\ArcGIS\bin

    • For 32-bit Windows operating systems: C:\Program Files\Common Files\ArcGIS\bin

  2. After replacing the config file, re-execute the ESRIRegAsm.exe registration.

    For example (using the same example as before):

    C:\Projects\ClassLibFor102\bin\Release> "C:\Program Files (x86)\Common Files\ArcGIS\bin\esriregasm.exe" classlibraryfor102.dll /p:Desktop

    The following message should now be displayed:
    [O-Image]

文章 ID: 000012311

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项