Hello. I'm using the "AfterBuild" event in the project file of my C# add-in to sign the add-in file after it is successfully built, as shown in the ProGuide page here:
ProGuide Digitally signed add ins · Esri/arcgis-pro-sdk Wiki · GitHub
Here is the snippet from my project file, which has worked fine up until the recent 1.4 SDK:
Now whenever I build in release mode (note the condition), I get this error:
Can anyone advise? If I remove the "DependsOnTargets" part, it tries to sign the add-in before it has finished building the add-in file, so fails.
Regards,
Luke
Hi Luke,
The DependsOnTargets value should be PackageArcGISContents. This snippet below works for me.
Thanks
Uma
<Target Name="AfterBuild" DependsOnTargets="PackageArcGISContents">
<!--Replace the path in the sample command below to your pfx file on disk and use the password that has been assigned to the pfx file.
Confirm that the path to ArcGIS Pro bin folder matches your installation location.-->
<Exec Command=""C:\Program Files\ArcGIS\Pro\bin\ArcGISSignAddIn.exe" $(TargetDir)$(TargetName).esriAddInX /c:D:\esri.pfx /p:*****/s" />
<!-- Note: to register the Add-in you need to run RegisterAddin.exe. Modify the path to your RegisterAddin.exe
location as needed-->
<Exec Command=""C:\Program Files\ArcGIS\Pro\bin\RegisterAddin.exe" $(TargetDir)$(TargetName).esriAddInX /s" />
</Target>
Thank you Uma. I'm confused as to why it's been working for me up until now if I got the value wrong... strange!
Regards,
Luke