ArcGIS Pro Generate esriAddinX error

779
7
Jump to solution
09-15-2023 01:26 PM
MaxwellS
New Contributor II

So, I had a C# ArcGIS 2.7 Add-In using Visual Studio 2019 that I originally upgraded to 3.1 for Visual Studio 2022; however, I learned that I needed to upgrade to version 3.0 instead. Between the conversion to 3.1 and learning about this required downgrade, quite a few changes were made to the project, so I had to set up a workaround where I converted the older 2.7 Add-In to 3.0 and copied my code Add-In for 3.1 to this solution, fixing any changes going from 3.1 back to 3.0.

Anyways, I had built the solution and things were working for a bit, but now, when I build, I get the following output:

Build started...
1>------ Build started: Project: TestProject, Configuration: Debug Any CPU ------
1>Test -> C:\Users\msinger\Documents\TestProject\TestButton\TestButton\bin\Debug\net6.0-windows\Test.dll
1>IntermediateOutputPath Name: obj\Debug\net6.0-windows\...
1>CleanFile Name: Test.csproj.FileListAbsolute.txt...
1>ProjectDir Name: C:\Users\msinger\Documents\TestProject\TestButton\TestButton\...
1>AssemblyName Name: Test...
1>TargetFileName Name: Test.dll...
1>RootNamespace: Test...
1>TargetFolder Name: bin\Debug\net6.0-windows\...
1>PackageType Name: Addin...
1>Install dir: C:\Program Files\ArcGIS\Pro\
1>ConvertToRelativePath Task, TargetDir: C:\Users\msinger\Documents\TestProject\TestButton\TestButton\bin\Debug\net6.0-windows\
1>Running PackageArcGISContents...
1>ZipIntermediatePath: Install...
1>Deploying Addin...
1>ArcGISFolder Name: C:\Program Files\ArcGIS\Pro\...
1>Execute RegisterAddIn.exe "" /s...
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Where on line 18 it shows that there is no argument passed to RegisterAddIn.exe. When building the 3.1 version of the Add-In, I practically the same output, except for

1>Execute RegisterAddIn.exe "C:\Users\msinger\Documents\Summer2023\Test\TestButton\TestButton\bin\Debug\net6.0-windows\Test.esriAddinX" /s...

Where the Test.esriAddinX is actually generated. 

I've checked the Debug\net6.0-windows\ folder and found most of the same files that I can find in the .esriAddinX are there, but for some reason it's not then taking these files and packing it into a .esriAddinX. Is there some place I should look in order to fix the project not creating this .esriAddinX? Please let me know if more information is needed. Thank you.

0 Kudos
1 Solution

Accepted Solutions
MaxwellS
New Contributor II

Okay, so it appears the solution to this was changing the Config.daml Build Action back to "Content, Do Not Copy" again. It's strange, because I hadn't started changing these settings until the issues start to occur, but apparently resetting it to this value fixed things.

Regardless, the Config.daml is still partially working, as it did update the version from 3.1 to 3.0; however, one of the images for my Add-In buttons will not display anymore. 

View solution in original post

0 Kudos
7 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

There is no need to downgrade to 3.0 ... migrating your 2.7 project to 3.1 should work as well as migrating to 3.0.  If you have a 3.1 project and you want to develop / run on 3.0 then you have to make a change in the config.daml under the AddInInfo tag by changing the 'desktopVersion' attribute to 3.0.0.

<AddInInfo id="..." version="1.01" desktopVersion="3.0.36056">
0 Kudos
MaxwellS
New Contributor II

Right, I remember seeing this solution on another post here; however, after further testing, I think I've found that my issue is that Config.daml is not updating in the Add-In. When I check the .esriAddInX, the changes I made to the version are not present (It's still identifying as 3.1). I've actually had this issue (The Config.daml not updating) off and on while working with ArcPro before, but I never could recall finding a specific solution. I tried changing the Build Action for the Config.daml to Copy Always, but nothing changes. Would you know how to correct this?

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

I usually do a rebuild after i change the config.daml ... I can't recall why.  But if that doesn't work check if you have any other instances of ArcGIS Pro running.

0 Kudos
MaxwellS
New Contributor II

Yeah, I tried rebuilding the project and the entire solution. I even went a little crazy and completely uninstalled ArcGIS Pro and the SDK in case something from 3.1 was lingering, but still, the Config.daml isn't updating. 

0 Kudos
MaxwellS
New Contributor II

Okay, so it appears the solution to this was changing the Config.daml Build Action back to "Content, Do Not Copy" again. It's strange, because I hadn't started changing these settings until the issues start to occur, but apparently resetting it to this value fixed things.

Regardless, the Config.daml is still partially working, as it did update the version from 3.1 to 3.0; however, one of the images for my Add-In buttons will not display anymore. 

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

can you provide the Add-in button's config.daml line and also the location and the properties of the image that you are referencing in the config.daml?

0 Kudos
MaxwellS
New Contributor II

The Config.daml line for the button is:

</button>
<button id="TestButton" caption="TEST" className="TestButton" loadOnClick="true" smallImage="Images\Test16.png" largeImage="Images\Test32.png">
  <tooltip heading="Test Tool">Test Tool Description</tooltip>
</button>

The image is within the root project folder Test\Test32.png (The same for Test16.png).

MaxwellS_0-1695405278759.png

The Test16.png is identical.

 

0 Kudos