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