Add-In shows with two ribbons

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

Add-In shows with two ribbons
There are two ribbons of the add-in after version upgrade from 1.x.x.x to 2.x.x.x 
Phil Paul


Guest


Dear Add-In Express Team,

we have an Add-in for PowerPoint which adds a new ribbon to PowerPoint.
For some clients we deploy this via click once.

Updating works well so far: we distribute the new version and call
checkforupdates or have the user double-click on the myAddIn.application
file to upgrade.

However, we ran into the following issue: After adding quite a lot of new
functionality we increased the first digit of the version number to "2"
instead of "1". Now, when we distribute a new version and the users install
the add-in by double-clicking on the myAddIn.application file the see
our ribbon twice. The two ribbons have the same caption, show the same
content and both seem to work, meaning you can click on the functions of
the first or second ribbon and they will both execute correctly. Interestingly
the ribbons both show the NEW version and not the old one anymore.

Currently we have to ask users to first uninstall the old version before
upgrading but this is quite inconvenient and some users will skip this step.


Questions:

(1) Do you know what is triggering this and what I can do to prevent two versions
from being installed?

(2) Is there any good way to fix it on the users machine, once they have the two ribbons
showing? I currently go into developer tools | Com Add-Ins and disable one of the
lines. This will crash PowerPoint but after that the add-in shows only once (although
it still has two entries in the COM Add-In dialog)


Thank you for any support on this topic - we really appreciate the great support you provide!
Phil
Posted 06 Aug, 2018 23:56:53 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Phil,

Two copies of the same Ribbon shown means you have two instances of the add-in running; two entries in the COM Add-In dialog confirm that.

You need to check your update mechanism. The same Ribbon may be shown if you create the Ribbon controls on the fly. You can add a test button/label showing System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() to find what assembly version creates the Ribbon or executes when you click a Ribbon control.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Aug, 2018 02:57:41 Top
Phil Paul


Guest


Dear Andrei,

thank you for your swift reply.

Just to clarify: In general, the add-in only shows with one ribbon when the user installs it for the first time. Also, when a user clicks on the myAddIn.application file the add-in is upgraded correctly and after the upgrade they have a new version of the add-in with only one ribbon. So this is generally all working as expected.

The problem: Only when they switch from version 1.x.x.x to version 2.x.x.x by double-clicking on the myAddIn.application file this is NOT working and they end up with two instances.

You need to check your update mechanism.

The ?Â?Ð?ìupgrade mechanism?Â?Ð?í in this case is just the double-click on the myAddIn.application file ?Â?Ð?ã so I do not have any code for this which I could check. Usually I understand that when executing the .application file the old version gets unregistered and the new version gets registered automatically. But this does not work in the version switch from 1.x.x.x. to 2.x.x.x for our add-in.

What could be the cause that when switching from 1.x.x.x to 2.x.x.x the built-in upgrade mechanism fails? Is this a known issue when switching major versions?

I do not really know how to follow your suggestion on using System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(). Regardless of the results: I do not have any code that is executed when the user double-clicks on the myAddIn.application file ?Â?Ð?ã so the ?Â?Ð?ìupgrade mechanism?Â?Ð?í seems to be out of my control. Am I overlooking something?

Thank you again,
Phil
Posted 07 Aug, 2018 22:33:46 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Phil,

I cannot reproduce this issue in this scenario:
- I created and published an add-in so that its Installation URL points to a location which is never used.
- I double-clicked the .application file in the {my add-in project}\Publish folder to install the add-in; I see how it shows its Ribbon button
- I modified the add-in project version, added another Ribbon button to the UI, published the add-in and double-clicked the .application

Did you rename your project recently?


Andrei Smolin
Add-in Express Team Leader
Posted 08 Aug, 2018 07:09:49 Top
Phil Paul


Guest


Dear Andrei,

yes - indeed we updated the name of the add-in: at least the project name and the name of the project folder.
Does this trigger that we get two ribbons (both showing the "new" version of the add-in)?

Is there anything I can in my new version to make sure that the old version is uninstalled when I install
the new version via click once?

Thank you very much,

Phil
Posted 09 Aug, 2018 11:09:38 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Phil,

ClickOnce uses the project name to identify a ClickOnce application. Renaming the project doesn't let ClickOnce uninstall the previous version. You should revert this change or instruct the users to uninstall the old version manually.


Andrei Smolin
Add-in Express Team Leader
Posted 10 Aug, 2018 05:44:46 Top
Phil Paul


Guest


Hello Andrei,

ok - it's good to know where the issue is coming from and that it is not connected
to the version numbering but the project name.

We will not be able to revert the change but then I know it is only a transition
until we have everyone on the new version an will not happen again when we switch
to another major version number in the future.

Thank you for your help!
Phil
Posted 10 Aug, 2018 07:46:47 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 10 Aug, 2018 08:18:17 Top