ERROR

ESRIRegAsm.exe Error: Registration Failed. Could not load file or assembly

Last Published: July 21, 2023

Error Message

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]

Cause

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.

Solution or Workaround

  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]

Article ID:000012311

Software:
  • ArcObjects SDK Microsoft NET Framework

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic