2 problems- Visual Studio crashes on register build and Addin does not load on startup

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

2 problems- Visual Studio crashes on register build and Addin does not load on startup
 
Subscribe
Hrishikesh Shahapurkar




Posts: 22
Joined: 2019-09-04
Hi,

As mentioned in the topic subject I am constantly facing the below mentioned problems:

1. Addinexpress register- I am using visual studio 2017 and every time I click on register, it ends up crashing. Alternatively I was using the visual studio build action to work around. It worked fine till it worked fine and one day it just would not reflect the changes on the addin. So to fix this issue, I referred to one of your forums where you mentioned that reinstalling the addinexpress package would fix this. So I did that, and now it does build and gets added to outlook(but on register my Visual studio still crashes) and this is where my 2nd problem begins i.e. my addin does not load on startup.
2. So for my second problem the add in shows in the inactive addins section, which I am not sure why? So I started to fix this by getting into the registry and saw that my addin only appears in addin data folder of the registry and not the addins folder. Then I created a folder in Addins with my addin name and set the LoadBehavior to 3 and thought it would work then and it didn't.

Kindly advice.

Note: My addin express version is 9.44


Thanks and Regards,

Hrishikesh Shahapurkar
Posted 20 Oct, 2021 09:31:12 Top
Andrei Smolin


Add-in Express team


Posts: 17943
Joined: 2006-05-11
Hello Hrishikesh,

Does this occurs on a newly created add-in project?

If no, make sure you have NO custom code in the constructor of the add-in module. All such code should be invoked in an event of the module, not in the constructor. The same applies to initialisers of complex-type class-level variables in the add-in module: all such variables should be initialized in an event of the module. The very first event that the module raises is either OnRibbonBeforeCrreate or AddinInitialize. Which of them is first depends on many things; it may occur so that they are raised in a different order some day.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Oct, 2021 11:02:54 Top
Hrishikesh Shahapurkar




Posts: 22
Joined: 2019-09-04
So there is no custom code. I checked the Event Viewer and this is the information I got:

Faulting application name: devenv.exe, version: 15.9.28307.1705, time stamp: 0x6152302d
Faulting module name: clr.dll, version: 4.8.4075.0, time stamp: 0x5dd8a356
Exception code: 0xc00000fd
Fault offset: 0x00017793
Faulting process id: 0x1260
Faulting application start time: 0x01d7c698fd50b48d
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: e272cb02-3581-404d-98bc-81354af05845
Faulting package full name:
Faulting package-relative application ID:
Posted 21 Oct, 2021 13:17:23 Top
Andrei Smolin


Add-in Express team


Posts: 17943
Joined: 2006-05-11
Hello Hrishikesh,

Thank you for the details. You can try to install the latest updates on your Visual Studio.

Please answer my questions:

1. Does this occur on a newly created add-in project?

2. Do you have complex-type class-level variables having an initializer? Even setting such a variable to null (Nothing in VB.NET) may influence the issue.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Oct, 2021 02:41:11 Top
Hrishikesh Shahapurkar




Posts: 22
Joined: 2019-09-04
Hi Andrei,

I have update my visual studio to its latest version.

1. This is an old project.

2. No.

Regards,
Hrishikesh Shahapurkar
Posted 25 Oct, 2021 09:13:26 Top
Andrei Smolin


Add-in Express team


Posts: 17943
Joined: 2006-05-11
Hello Hrishikesh,

Please create a new add-in project. Does the issue occur on it?

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Oct, 2021 05:33:16 Top
Hrishikesh Shahapurkar




Posts: 22
Joined: 2019-09-04
Hi Andrei,

It does not occur on a new project. So is this caused due to a something inside InitializeComponent() ? Is there a way I can get some logs to investigate this better?

Regards,
Hrishikesh Shahapurkar
Posted 26 Oct, 2021 08:38:10 Top
Andrei Smolin


Add-in Express team


Posts: 17943
Joined: 2006-05-11
Hello Hrishikesh,

Comment out blocks of code in that method.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Oct, 2021 09:49:10 Top
Hrishikesh Shahapurkar




Posts: 22
Joined: 2019-09-04
Hi Andrei,

I commented out all the InitializeComponent() and it still crashes Visual studio.

Regards,

Hrishikesh Shahapurkar
Posted 26 Oct, 2021 10:12:46 Top
Andrei Smolin


Add-in Express team


Posts: 17943
Joined: 2006-05-11
Hello Hrishikesh,

Send your AddinModule.(cs or vb) and AddinModule.Designer.(cs or vb) to the support email address. All sensitive info can be replaced with anything. Please make sure your email contains a link to this topic.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Oct, 2021 02:52:51 Top