Select to view content in your preferred language

Add-in Build and Install Error

576
9
03-10-2025 11:22 AM
JoePolaski
Occasional Contributor

I don't know what specifically triggered this to start happening, but while developing I started noticing late last week that after making GUI changes to an Add-in I am working on, they were never showing up in the actual add-in. After extensive testing to make sure it wasn't an error on my part, I realized that the changes were not showing up because of some new error when building. I verified this by deleting the C:\Documents\ArcGIS\AddIns\ArcGISPro\{add in folder guid}  directory and rebuilding the project... I noticed the esriAddInX file is never being replaced. It says the build succeeded but when pro opens there is no trace of my add in.

I am also seeing as soon as RegisterAddIn.exe is run for my add in an exception gets thrown:

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

It seems like this could be a .NET version mismatch ? I have ArcGIS Pro 3.2 Installed and I am building an Add-In targeting ArcGIS Pro 3.1 using the Esri.ArcGISPro.Extensions30 Nuget package. This has been working totally fine until last week when I had to downgrade my version of pro from 3.3 to 3.2 to work with an enterprise geodatabase using Sql Server 2016.

I am really spinning my wheels on this and I have tried a few things to fix it with no luck. Has anyone encountered this before?

0 Kudos
9 Replies
UmaHarano
Esri Regular Contributor

You have Pro 3.2 installed (downgraded from 3.3). When you build addins, your visual studio project references the 3.1 Esri.ArcGISPro.Extensions30 Nuget package. Is this correct?

Can you please check the following:

* Where is RegisterAddin.exe on your machine? Is it in the install-location\ bin folder or C:\ProgramData?

0 Kudos
JoePolaski
Occasional Contributor

Hi @UmaHarano  it is currently located in C:\Program Files\ArcGIS\Pro\bin

0 Kudos
SelimDissem
Esri Contributor

At 3.2, Pro and the Pro SDK use .NET 6.x while at 3.3 Pro and the Pro SDK use .NET 8.x. This is likely the source of the discrepancy.

You'll likely need to downgrade your references to .NET 6 

0 Kudos
JoePolaski
Occasional Contributor

I am using ArcGIS Pro SDK 3.2 along with ArcGIS Pro 3.2. The project is targeting .NET 6 and as far as I know does not have any references to .NET 8

0 Kudos
UmaHarano
Esri Regular Contributor

If you don't already have this option turned on, can you please turn on the Visual Studio verbosity option to detailed?

And then, if you can compile your project, please check and see in the output exactly where RegisterAddIn.exe is being invoked from.

UmaHarano_0-1741715944062.png

As example, I see this in my output window when building addins:

  Task "Message"
    ArcGISFolder Name: C:\Program Files\ArcGIS\Pro\bin...
  Done executing task "Message".
  Task "Message" skipped, due to false condition; (!Exists('$(ArcGISFolder)')) was evaluated as (!Exists('C:\Program Files\ArcGIS\Pro\bin')).
  Task "Message"
    Execute RegisterAddIn.exe "C:\PathTo.esriAddinX" /s...
  Done executing task "Message".
  Task "Exec"
    RegisterAddIn.exe "C:\PathTo.esriAddinX" /s

 

0 Kudos
JoePolaski
Occasional Contributor

Hi @UmaHarano ,

So I am seeing this

Task "Message"
1>    ArcGISFolder Name: C:\Program Files\ArcGIS\Pro\...
1>  Done executing task "Message".
1>  Task "Message" skipped, due to false condition; ('$(ArcGISFolder)' == '') was evaluated as ('C:\Program Files\ArcGIS\Pro\' == '').

 It then executes  RegsiterAddIn.exe on the esriAddInX file in my repo and immediately gets this exception

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
1>    File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

 and exits with code exited with code -532462766.

If I I check my installed sdks I can see this

dotnet --list-sdks
6.0.136 [C:\Program Files\dotnet\sdk]
8.0.403 [C:\Program Files\dotnet\sdk]
9.0.102 [C:\Program Files\dotnet\sdk]


I also have .NET 6 SDK showing installed for VS. Not sure what to do to correct this.

 

0 Kudos
UmaHarano
Esri Regular Contributor

Two quick checks:

You mentioned that RegisterAddIn.exe is in your C:\Program Files\ArcGIS\Pro\bin.

1. Can you please check its version? Right click on the exe and click Details tab to get the version.

2. Next, your esriAddInX file for your solution should be in your solution's Debug folder. When you double click it, what happens?

I think for some reason your RegisterAddIn.exe is not matching the version of ArcGIS Pro on your machine. So that is what I am trying to check.

 

0 Kudos
JoePolaski
Occasional Contributor

Hi @UmaHarano ,

1. So the RegisterAddIn.exe version is listed as 13.3.0.52636

2. When I double click the esriAddInX file I get the little circle progressor symbol near my mouse pointer showing something is starting to happen... then it goes away and nothing happens.

This is interesting because the installer should launch.

0 Kudos
UmaHarano
Esri Regular Contributor

Hi @JoePolaski 

You have Pro 3.2 on the machine, correct? Based on the version of RegisterAddIn.exe that you shared above, it is at version 3.3.

On your machine, do you have a C:\ProgramData\EsriProCommon folder? It should have the RegisterAddIn.exe and it should be at 13.2.0.XXXX.  So let's confirm that first.

When you are targeting ArcGIS Pro 3.2, your solution should use the exe from this location. (Which is the next step to fix)

 

0 Kudos