Add-in is not registered if RegisterForAllUsers = True

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

Add-in is not registered if RegisterForAllUsers = True
 
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi, Andrei

Just happened to hit upon this anomaly (?) by chance.

I am just beginning an Excel add-in.
I have created 3 Ribbon tabs, with groups and buttons with icons (glyphs).
I have not yet written a single line of code.

I build, register and debug.

The add-in loads correctly.

----

Next, I do an experiment.

I unregister the add-in.

Then I go to AddinModule.vb[Designer] > Properties and change RegisterForAllUsers from False to True.

I build, register and debug.

This time the add-in does not load. It is not even Registered in Excel.

-----

If I set RegisterForAllUsers back to False, the add-in loads correctly.

red
Is this normal behaviour, or have I done something wrong?

Thanks
Leon

-----
red

I read this in your ADX manual:

Before you modify the RegisterForAllUsers property, you must unregister the add-in project on your development PC and make sure that adxloader.dll.manifest is writable.


red
Posted 24 May, 2019 04:31:16 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Leon,

This isn't expected. adxloader.dll.manifest gets read-only after you save the project to a source control system such as Visual SourceSafe. For a newly-created add-in project, that file is writable with a really high probability.

We don't see any reasons for our code to misbehave in this fashion. Registering the project ends in one of these ways:
- The add-in gets registered and the "The Add-in Express project registration succeeded" message box is shown.
- The add-in isn't registered and the Output window contains information about compile-time issues.
- The add-in isn't registered due to an exception in the code of Add-in Express and a message box providing info about the exception is shown.

A while back, we investigated a possibility of an issue in our code and received a negative result. I create add-in projects really often and I've noticed that sometimes an Excel COM add-in doesn't register.

Why Excel? This is probably because Excel begins the list of Office applications in a project wizard window.

In my case we come to conclusion that I might click Unregister (rather than Register); this produced the "The Add-in Express project unregistration succeeded" message box and I didn't read it.


Andrei Smolin
Add-in Express Team Leader
Posted 24 May, 2019 05:27:45 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi, Andrei

Thanks for reply.

This isn't expected


I quite agree with you. The problem is giving me lots of headache. I can't even start an add-in without my add-in crashing or not loading in Excel.

Let's start a new COM Add-in anew:
Let's re-install Add-in Express (in case ADX is corrupt). Done!

Let's create the simplest possible Excel add-in: A single Ribbon Tab. Nothing else. Done!
Note that I have checked the Add to source control box.
I also repeated the experiment with this box unchecked. Same problem.

Build > Register > Debug. Done!

The add-in is correctly loaded.

-------

Then I unregister, change RegisterForAllUsers to True.
Build > Register > Debug

This time the add-in does not Register in Excel and does not load!

---

I have deleted my folders and repeated the experiment 4 times. Same results.

As you said:
This isn't expected


But with an add-in at such an early stage, it should be clear what error I have made.

Could you please advise or suggest paths of investigation?

Best Regards,
Leon
Posted 24 May, 2019 06:03:40 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Leon,

I can't reproduce the issue. The only difference is: I don't add the project to source control.

Start Excel, open File | Office, find the About Excel button, to the right of it there is the version string: it starts with "Version" and ends with ")". Please provide the complete version string.

Is there EXCEL.EXE hanging in processes after you close Excel?

Do you have warnings or errors while you register the project?

Please confirm that you start Visual Studio via the "Run as administrator" option.

If there any COM add-ins and Excel add-ins, turn them off. Does the issue persist? If yes, please capture a video showing all the steps and send it to the support email address. I remember that you didn't find that address in readme.txt; please find it now: open {Add-in Express installation folder}\readme.txt in any text editor and search for "Feel free to write to us at".

Does the problem go away if you register the add-in project once again?


Andrei Smolin
Add-in Express Team Leader
Posted 24 May, 2019 07:32:06 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Is adxloader.log created/updated when you start Excel with the per-machine add-in?


Andrei Smolin
Add-in Express Team Leader
Posted 24 May, 2019 07:33:29 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi, Andrei

After spending the whole week-end trying to sort out my problem, it finally dawned on me that probably the problem was not with ADX, but with Excel.

I reinstalled Excel, and now everything works well.

Best Regards,
Leon
Posted 27 May, 2019 03:46:47 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Congratulations!


Andrei Smolin
Add-in Express Team Leader
Posted 27 May, 2019 04:09:48 Top