Registering an extension (ESRIRegAsm) cannot find assembly

5257
2
05-29-2015 04:37 AM
DavidStefan
New Contributor III

I am learning to develop ArcMap extensions using ArcObjects for .NET in Visual Studio C# 2010 Express.

To start with, I have successfully compiled the example of implementing a dockable browser window from ESRI website (ArcObjects 10 .NET SDK Help​). I have been able to debug the example, add the command from its category to a toolbar in ArcMap and open the browser window. This is when I debug or register the extension with ArcDesktop 10.2.2 which is on my dev machine (I am able to both debug the extension and register the release using the ESRIRegAsm.exe utility).

Now, when I port the extension .dll library to another machine with ArcDesktop 10.1 and try to register the extension I get the following error:

Registration failed.

Could not load file or assembly 'ESRI.ArcGIS.Desktop.Addins,

Version=10.2.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'

or one of its dependencies. The system cannot find the file specified.

The project doesn't have the Config.esriaddinx file so I don't really know where to look for configuring the build to make this work.

Where should I look for advice?

0 Kudos
2 Replies
DavidStefan
New Contributor III

As a side note, I have tried to compile both with ticked and unticked Build option "Register for COM interop", I have tried to compile and register with admin rights, I have tried to remove and re-add reference to ESRI.ArcGIS.Desktop.AddIns... I have tried every single advice I could find on the web to resolve this and I'm obviously still missing something.

Please help.

0 Kudos
SamiEria
New Contributor III

It is not clear how you are getting an error message regarding "Add-ins," yet you are trying to compile a code sample that does not use any Add-ins.

Could you clarify on your workflow.

1) Are you creating an Add-in Extension in ArcGIS 10.1 using the ESRI Template (File -> New Project -> Desktop Add-ins -> ArcMap Add-in -> Next -> Extension ?

2) Or, did you download the ArcObjects 10.0 code sample located here, http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Web_browser_dock...   , and then somehow got it to compile for 10.2.2, and then copied the output DLL onto a machine with ArcGIS 10.1, and attempted to register it by right-clicking it, and selecting "Register"?

A step-by-step list of your workflow would be needed to understand the problem.

In the mean time, you could try the following fix:

1- In Visual Studio's Solution Explorer, expand the References list.

2- Select all ESRI references by holding down the shift key.

3- Right-click and select Properties.

4- In the Properties Panel, set the Specific Version property to "false".

5- Re-build.

If this does not resolve the issue, provide a detailed bulleted list of steps you followed, right from the beginning to the point where you obtain your error. A couple screenshots of your Visual Studio window would also be helpful, especially, a screenshot capturing the error message exactly as displayed in Visual Studio.

0 Kudos