Cannot Register my add-in

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

Cannot Register my add-in
 
Leon Lai Kan




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

The following problem has happened to me at least 3 times within the past 2 months.
I was working on my add-in. Everything works well. But suddenly, I cannot register my add-in.
I was able to register it all the time.

Each time, my procedure is the same:
I create a simple add-in. Create a few ribbon tabs, groups, and buttons (with some glyphs).

I build, Register, Debug.

Excel opens, and the Ribbon appears perfectly formed.

But then suddenly, when I Debug, my add-in tabs no longer appear on the Ribbon.

I spent lots of time (in vain) to find the cause. In despair, I had to recreate the project anew, rather than ask you for help.


Last time, I posted a question on the forum, but before you could reply (Public Holidays in Belarus!), I had sorted out the problem:
The add-in was hidden in the "Disabled" section (Options > Add-ins > Manage > Disabled Items).
So, I deleted the post.

Today, there is no add-in in the "Disabled" section.
I have absolutely no idea what has gone wrong.

As recreating an add-in from scratch takes a lot of time, I would like to know the reasons for my add-in not appearing on the Ribbon when I run Debug. So that I can take my precautions.

Any idea?

Note: Neither Excel nor ADX appear to have been corrupt. When I create a new add-in, it appears on the Ribbon.

Thanks
Leon

-----
red

Is there any way (while still in debug stage) to Register and Install my development add-in MANUALLY to Excel?
Posted 13 May, 2019 07:25:41 Top
Andrei Smolin


Add-in Express team


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

When the add-in loads, it creates an adxloader.log; this is by default. The default location of the log file is: {user profile}\AppData\Local\Temp\<ProductName>\adxloader.log; the ProductName part reflects the ProductName field of AssemblyInfo.cs (AssemblyInfo.vb).

If the log files doesn't update when you start the host application, this means Office doesn't even try to load your add-in. In this case, check section Troubleshooting add-in loading in the manual.

If the log file gets updated and the last line reads "The instance of the managed add-in class has been created successfully", then your add-in loads correctly.

There's a scenario when the add-in loads correctly but it shows no Ribbons because of this issue. If you check the InitializeComponent() in AddinModule.Designer.vb, you'll see the following code lines:


' THIS IS RIGHT:
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.AdxRibbonTab1 = New AddinExpress.MSO.ADXRibbonTab(Me.components)
        Me.AdxRibbonGroup1 = New AddinExpress.MSO.ADXRibbonGroup(Me.components)
        Me.AdxRibbonButton1 = New AddinExpress.MSO.ADXRibbonButton(Me.components)


The issue that may occur is: "Me.components" above gets missing:


' THIS IS WRONG:
    Private Sub InitializeComponent()
        Me.AdxRibbonTab1 = New AddinExpress.MSO.ADXRibbonTab()
        Me.AdxRibbonGroup1 = New AddinExpress.MSO.ADXRibbonGroup()
        Me.AdxRibbonButton1 = New AddinExpress.MSO.ADXRibbonButton()


Add the "Me.components" missing and rebuild your project.


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 08:01:50 Top
Leon Lai Kan




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

Thanks for your reply.

AdxLoader.log

I find only 2 log files for today.
Both show the foll. on the last line:
The instance of the managed add-in class has been created successfully.


So, it seems that my add-in has correctly loaded.

But, there's something strange: I built, unregistered, registered, debug at least a dozen tines today.
Yet, there are only 2 adxloader.log files for today. ??

Private Sub InitializeComponent

It appears to be right, as you can see from a copy of Visual Studio code:

Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AddinModule))
        Me.AdxRibbonTab1 = New AddinExpress.MSO.ADXRibbonTab(Me.components)
        Me.AdxRibbonGroup1 = New AddinExpress.MSO.ADXRibbonGroup(Me.components)
        Me.AdxRibbonButton23 = New AddinExpress.MSO.ADXRibbonButton(Me.components)
        Me.AdxRibbonSeparator18 = New AddinExpress.MSO.ADXRibbonSeparator(Me.components)
        Me.AdxRibbonButton15 = New AddinExpress.MSO.ADXRibbonButton(Me.components)



I don't know what other cause may explain the problem.

I think I will have to re-create the project anew.

Maybe, I need to create backups more frequently?

Thanks for your effort.

Best Regards,
Leon
Posted 13 May, 2019 09:00:57 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Leon Lai Kan writes:
Yet, there are only 2 adxloader.log files for today. ??


The file is rewritten on every start. It isn't rewritten if Office doesn't load your add-in.


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 09:02:35 Top
Leon Lai Kan




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

On the contrary, I find there are 23 log files called:
aria-debug-9999.log
Most of these log files are just empty.
23 could correspond +/- to the number of times I registered and debugged my add-in today.


I don't find any aria .log files in previous days.

Any relation?


Leon
Posted 13 May, 2019 09:15:51 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Leon Lai Kan writes:
On the contrary, I find there are 23 log files


Are these add-in Express log files?


Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 09:16:58 Top
Leon Lai Kan




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

Our mails crossed again.

Before I could amend my reply, you had already asked a question.

pl see my completed reply

Here is the text of 1 aria file which is not empty:
Logging inited C:\Users\KENLEE~1\AppData\Local\Temp\aria-debug-4540.log 1
Posted 13 May, 2019 09:22:57 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Here's the header of an adxloader.log created on my machine recently:

Add-in Express Loader Log File: 05/09/2019 11:11:12:298

Startup directory: E:\_Projects\_tests\_Andrei Smolin\MyAddin79\MyAddin79\bin\Debug\
Loader version: 9.2.4635.0
Operating System: Microsoft Windows 10 Professional (build 17134), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE"
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------



Andrei Smolin
Add-in Express Team Leader
Posted 13 May, 2019 09:30:53 Top
Leon Lai Kan




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

Thanks for all your effort.

I deleted all of yesterday's log files.

I rebuilt, registered and debugged my add-in again.

I don't find any adxloader.log produced, despite several attempts.
So, my add-in is not loaded in Excel.

As my add-in is only in an early stage of completion, I am not going to waste my time and yours investigating the problem.
I'll restart anew.

But now, I'll make more frequent backups, preferably each time I completed something new to my add-in.

BTW, the aria files are produced by Outlook.

Best Regards,
Leon
Posted 14 May, 2019 01:15:01 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
No problem.


Andrei Smolin
Add-in Express Team Leader
Posted 14 May, 2019 04:35:19 Top