AddIn built using .NET 3.5 crashes at startup

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

AddIn built using .NET 3.5 crashes at startup
 
Subscribe
Sergey Chizh




Posts: 62
Joined: 2012-10-23
Hi.

This issue is related to my previous one (https://www.add-in-express.com/forum/read.php?FID=5&TID=15475)

Environment:
ADX version : 9.3.4641.0
Windows version: Windows 10. Version 1903 (build 18362.30) Danish
Office version: Office 2013 Standard. (15.0.4420.1017) MSO (15.0.4551.1007) 32-bit

Problem description:
When AddIn is build using .NET 3.5 it throws an exception at startup https://www.screencast.com/t/D4THrpqCnTl
Also Word hangs when exiting.
If the same AddIn is built as .NET 5.4 then everything works perfectly. Unfortunatelly, we can't change .NET version is our application to .net 4.5 due to other issues, so we are worried why it happens.

Could you please investigate the issue? Feel free to ask any information.
Thank you!

AdxLoader contents:

Add-in Express Loader Log File: 06/24/2019 15:24:48:094

Startup directory: C:\Users\MIB\AppData\Local\Default Company\MyAddin5\
Loader version: 9.3.4641.0
Operating System: Microsoft Windows 10 Professional (build 18362), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files (x86)\Microsoft Office\Office15\WINWORD.EXE"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): Off
------------------------------------------------------------------------
15:24:48:095 3056 12420 Start.
15:24:48:095 3056 12420 The minimum supported Office version is 15
15:24:48:095 3056 12420 The host's version is 15.0.4420.0
15:24:48:095 3056 12420 Creating a new instance of the add-in loader.
15:24:48:095 3056 12420 Loading mscoree.dll
15:24:48:095 3056 12420 INFO: Assembly codebase - C:\Users\MIB\AppData\Local\Default Company\MyAddin5\MyAddin5.dll.
15:24:48:095 3056 12420 INFO: Assembly version - 1.0.0.0.
15:24:48:095 3056 12420 Success.
15:24:48:095 3056 12420 Loading the configuration from the system registry.
15:24:48:095 3056 12420 Getting the latest CLR version.
15:24:48:096 3056 12420 The latest CLR version is 'v4.0.30319'.
15:24:48:096 3056 12420 The configuration has been loaded successfully.
15:24:48:096 3056 12420 Runtime version: v2.0.50727.
15:24:48:096 3056 12420 Assembly name: MyAddin5, PublicKeyToken=2043AC542E6F5514.
15:24:48:096 3056 12420 Class name: MyAddin5.AddinModule.
15:24:48:096 3056 12420 Registry key: CLSID\{5310D5A8-B78C-4A16-A567-4F60145C1D64}.
15:24:48:096 3056 12420 Attempting to create a new instance of the managed add-in class: CLR - v2.0.50727
15:24:48:096 3056 12420 Loading CLR: v2.0.50727.
15:24:48:096 3056 12420 Calling CLRCreateInstance method.
15:24:48:096 3056 12420 Success.
15:24:48:096 3056 12420 Calling GetRuntime method.
15:24:48:096 3056 12420 Success.
15:24:48:096 3056 12420 Checking if the hosting API of .NET Framework v4.0 beta is installed.
15:24:48:104 3056 12420 The hosting API is up to date.
15:24:48:104 3056 12420 Calling GetInterface method for the CorRuntimeHost interface.
15:24:48:104 3056 12420 Success.
15:24:48:104 3056 12420 Starting CLR...
15:24:48:104 3056 12420 Success.
15:24:48:104 3056 12420 Getting the CLR version.
15:24:48:104 3056 12420 The CLR v2.0.50727 has been initialized successfully.
15:24:48:104 3056 12420 Creating a new domain setup.
15:24:48:106 3056 12420 Success.
15:24:48:106 3056 12420 Getting the add-in directory.
15:24:48:106 3056 12420 Success. The directory is 'C:\Users\MIB\AppData\Local\Default Company\MyAddin5\'
15:24:48:106 3056 12420 The 'shadow copy' is disabled.
15:24:48:106 3056 12420 Creating a new application domain.
15:24:48:111 3056 12420 Success.
15:24:48:111 3056 12420 Creating an instance of the managed class. Assembly identity: 'MyAddin5, PublicKeyToken=2043AC542E6F5514'
15:24:48:200 3056 12420 Success.
15:24:48:200 3056 12420 Unwrapping the managed class.
15:24:48:266 3056 12420 Success.
15:24:48:266 3056 12420 Querying the add-in extensibility.
15:24:48:266 3056 12420 Success.
15:24:48:266 3056 12420 Querying the custom task panes.
15:24:48:266 3056 12420 Success.
15:24:48:266 3056 12420 Querying the ribbon extensibility.
15:24:48:266 3056 12420 Success.
15:24:48:266 3056 12420 Querying the form regions.
15:24:48:266 3056 12420 Success.
15:24:48:266 3056 12420 Querying the encryption provider.
15:24:48:266 3056 12420 The 'EncryptionProvider' interface is not supported.
15:24:48:266 3056 12420 Getting the dispid of the 'Dispose' method.
15:24:48:269 3056 12420 Success.
15:24:48:269 3056 12420 Getting the dispid of the 'InitializeLoaderService' method.
15:24:48:269 3056 12420 Success.
15:24:48:269 3056 12420 Invoking the 'InitializeLoaderService' method.
15:24:48:269 3056 12420 Success.
15:24:48:269 3056 12420 The instance of the managed add-in class has been created successfully.



Full Stack trace:

Detailed technical information follows:
---
(Inner Exception)
(Inner Exception)
Date and Time: 24-06-2019 15:24:48
Machine Name: WS687
IP Address: fe80::fd1b:1ac6:dce1:afc8%13
Current User: CPHPORT\MIB

Application Domain: C:\Users\MIB\AppData\Local\Default Company\MyAddin5\
Assembly Codebase: file:///C:/Users/MIB/AppData/Local/Default Company/MyAddin5/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=9.3.4641.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 9.3.4641.0

Exception Source:
Exception Type: System.UnauthorizedAccessException
Exception Message: Adgang nægtet. (Undtagelse fra HRESULT: 0x80070005 (E_ACCESSDENIED))

---- Stack Trace ----



(Outer Exception)
Date and Time: 24-06-2019 15:24:48
Machine Name: WS687
IP Address: fe80::fd1b:1ac6:dce1:afc8%13
Current User: CPHPORT\MIB

Application Domain: C:\Users\MIB\AppData\Local\Default Company\MyAddin5\
Assembly Codebase: file:///C:/Users/MIB/AppData/Local/Default Company/MyAddin5/MyAddin5.DLL
Assembly Full Name: MyAddin5, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2043ac542e6f5514
Assembly Version: 1.0.0.0

Exception Source: MyAddin5
Exception Type: System.IO.FileLoadException
Exception Message: Filen eller assemblyen 'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' eller en af dens afhængigheder kunne ikke indlæses. Adgang nægtet.
Exception Target Site: get_HostApplicationType

---- Stack Trace ----
MyAddin5.AddinModule.get_HostApplicationType()
MyAddin5.DLL: N 00000 (0x0) JIT
MyAddin5.AddinModule.AddinModule_OnRibbonBeforeCreate(sender As Object, ribbonId As String)
MyAddin5.DLL: N 0001 (0x1) IL
AddinExpress.MSO.ADXAddinModule.AddinExpress.MSO.IRibbonExtensibility.GetCustomUI(RibbonID As String)
MyAddin5.DLL: N 0204 (0xCC) IL



(Outer Exception)
Date and Time: 24-06-2019 15:24:48
Machine Name: WS687
IP Address: fe80::fd1b:1ac6:dce1:afc8%13
Current User: CPHPORT\MIB

Application Domain: C:\Users\MIB\AppData\Local\Default Company\MyAddin5\
Assembly Codebase: file:///C:/Users/MIB/AppData/Local/Default Company/MyAddin5/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=9.3.4641.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 9.3.4641.0

Exception Source:
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: An error has occurred in the code of the add-in.

---- Stack Trace ----
Posted 24 Jun, 2019 08:24:13 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Hello Sergey,

This may relate to Office being updated right in this moment. We suggest that you 1) use embedded interops (in this case you don't need to deploy them) and 2) run the .NET Framework Repair Tool on that machine.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Jun, 2019 09:10:32 Top
Sergey Chizh




Posts: 62
Joined: 2012-10-23
Hi Andrei,

Wow, .NET repair tool helped! And it is really strange, because we ran it many times before without positive results :) Maybe you are right and it is something in Office or Windows update.

Thank you!
Posted 24 Jun, 2019 09:31:27 Top