Generating adxpublisher.exe.config file fails

Add-in Express™ Support Service
That's what is more important than anything else

Generating adxpublisher.exe.config file fails
Getting error "The 'adxpublisher.exe.config' file is not found.  
Jonatan Christensen




Posts: 53
Joined: 2012-10-09
Getting this error when attempting to use Clickonce deployment menu to autogenerate a adxpublisher.exe.config file
User added an image

What is typically related to this error?
My output directory path is for the file is simply: "Publish\"

~JC
Posted 03 Jan, 2019 03:56:33 Top
Jonatan Christensen




Posts: 53
Joined: 2012-10-09
This is really hurting my progress.

I need the autogenerated file to show me how to fetch a certificate from the certificate store instead of the file system.

Our new code signing certificate has some extra security on it, which prohibits exporting it as a pfx.

Instead you need to get it from the store and use a usb token to allow you to sign your files.

So I really need that autogenerated adxpublisher.exe.config file.

Otherwise could someone show me an example of fetching a a certificate from the certificate store in the file?
Posted 03 Jan, 2019 05:26:14 Top
Andrei Smolin


Add-in Express team


Posts: 16956
Joined: 2006-05-11
Hello Jonatan,

What Add-in Express build are you using? If you use Add-in Express 9.0 and if you have any related reports in your antivirus' log, please install the current Add-in Express version.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Jan, 2019 07:18:12 Top
Jonatan Christensen




Posts: 53
Joined: 2012-10-09
My current version is 8.7.4425

I will check for a newer version and report back
Posted 03 Jan, 2019 07:23:39 Top
Jonatan Christensen




Posts: 53
Joined: 2012-10-09
An upgrade did the trick it seems

I now have my auto generated File

Thank you for your help
Posted 03 Jan, 2019 07:49:25 Top
Andrei Smolin


Add-in Express team


Posts: 16956
Joined: 2006-05-11
Thank you for letting us know!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Jan, 2019 07:54:44 Top
Jonatan Christensen




Posts: 53
Joined: 2012-10-09
creating the adxpublisher.exe.config file, I was getting an error when running the adxpublisher.exe program.

I think it will be useful for future reference if I describe what happened here:

When running the adxpublisher.exe program I was getting the following message

Publisher: Preparing files...
Done.
Publisher: Populating files...
Done.
Publisher: Building prerequisites...
Done.
Publisher: Signing setup.exe...

Publisher failed. Failed to sign the 'C:\Projects\ClearView\Source Code\ClearView\Publish\setup.exe' file (HRESULT = -2147467259).
Publisher error (inner exception): A certificate chain could not be built to a trusted root authority


This was really confusing to me, because the addin-express publishing menu in visual studio created this config file after a successful publishing.

So here was the reason: The adxpublisher.exe uses the subject name (not necessarily unique) of the Certificate to find it in the certificate store, instead of using something unique like the thumb print. I had an old expired certificate with the same subject name in my certificate store, which was apparently been selected by the adxpublisher.exe instead of my newer certificate.

I would make the suggestion that a future version of the adxpublisher.exe either use a thumbprint or deprioritise expired certificates when searching for the specified certificate.

Until then I suggest to other forum users that they only have one certificate with a specific subject name, so as to not confuse the adxpublisher.exe program when creating clickonce installers.
Posted 04 Jan, 2019 02:29:33 Top
Andrei Smolin


Add-in Express team


Posts: 16956
Joined: 2006-05-11
Hello Jonatan,

Please use the certificateSubjectName attribute instead of certificateFile; when using our certificate, we specify certificateSubjectName="Add-in Express".

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jan, 2019 04:02:44 Top
Jonatan Christensen




Posts: 53
Joined: 2012-10-09
That is exactly what I did.

I was explaining a strange issue that I ran into, and explained how to get around it, so others might know to make sure not to have more than one certificate with that subject name in the store.

The issue remains the same: the subject name is not necessarily unique. Other certificates can have the same subject name in the certificate store. This is why I recommend adding the possibility to specify a thumbprint. Otherwise adxpublisher.exe might find the wrong certificate, which was what happened in my case.
Posted 04 Jan, 2019 04:11:36 Top
Andrei Smolin


Add-in Express team


Posts: 16956
Joined: 2006-05-11
Thank you, Jonatan! Great suggestion! I'll pass it to our guys.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jan, 2019 04:31:26 Top