Registration issue

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

Registration issue
'Add-in Express .NET' has fired an exception. received during registration.  
Dan Evans




Posts: 27
Joined: 2014-06-18
I have looked through the dev documents under the troubleshooting section and can not find anything relevant to the issue I am observing. This is only an issue for projects that used to run under an older version of Add-in express. creating a new add-in for Excel I don't see this issue.

No ADXLoader.log file is being created.

After installing from a published location the end user (myself on the dev box) receives the following exception :

Detailed technical information follows:
---
Date and Time: 6/16/2020 3:25:47 PM
Machine Name: LDN-WS123
IP Address: 10.128.66.146
Current User: WIN\devans

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Full Name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly Version: 4.0.0.0

Exception Source: mscorlib
Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'Rifle, PublicKeyToken=ed09811f64cc504a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Exception Target Site: _nLoad

---- Stack Trace ----
System.Reflection.RuntimeAssembly._nLoad(fileName As AssemblyName, codeBase As String, assemblySecurity As Evidence, locationHint As RuntimeAssembly, stackMark As StackCrawlMark&, pPrivHostBinder As IntPtr, throwOnFileNotFound As Boolean, forIntrospection As Boolean, suppressSecurityChecks As Boolean)
mscorlib.dll: N 00000 (0x0) JIT
System.Reflection.RuntimeAssembly.nLoad(fileName As AssemblyName, codeBase As String, assemblySecurity As Evidence, locationHint As RuntimeAssembly, stackMark As StackCrawlMark&, pPrivHostBinder As IntPtr, throwOnFileNotFound As Boolean, forIntrospection As Boolean, suppressSecurityChecks As Boolean)
mscorlib.dll: N 0000 (0x0) IL
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(assemblyRef As AssemblyName, assemblySecurity As Evidence, reqAssembly As RuntimeAssembly, stackMark As StackCrawlMark&, pPrivHostBinder As IntPtr, throwOnFileNotFound As Boolean, forIntrospection As Boolean, suppressSecurityChecks As Boolean)
mscorlib.dll: N 0099 (0x63) IL
System.Reflection.RuntimeAssembly.InternalLoad(assemblyString As String, assemblySecurity As Evidence, stackMark As StackCrawlMark&, pPrivHostBinder As IntPtr, forIntrospection As Boolean)
mscorlib.dll: N 0022 (0x16) IL
System.Reflection.RuntimeAssembly.InternalLoad(assemblyString As String, assemblySecurity As Evidence, stackMark As StackCrawlMark&, forIntrospection As Boolean)
mscorlib.dll: N 0000 (0x0) IL
System.AppDomain.Load(assemblyString As String)
mscorlib.dll: N 0002 (0x2) IL
AddinExpress.MSO.ADXLoaderSupport.ClickOnceRegistrationService_2(register As Boolean, assemblyIdentity As String, showExceptions As Boolean, closeProgress As EventHandler, flags As Int32)
mscorlib.dll: N 0026 (0x1A) IL
Posted 16 Jun, 2020 09:58:44 Top
Andrei Smolin


Add-in Express team


Posts: 17232
Joined: 2006-05-11
Hello Dan,

Dan Evans writes:
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


This exception occurs if an add-in assembly is built with one set of dependencies and the CLR finds a different set of assemblies on that machine. Typically, this relates to deployment: 1) either you deploy a dependency of a different version, bitness, or culture, or 2) you don't deploy a dependency used when building the add-in and the CLR finds an assembly of the same name having a different version, bitness, culture.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Jun, 2020 10:24:42 Top
Dan Evans




Posts: 27
Joined: 2014-06-18
Thank you for the guidance, after many hours of trial and error tweaking I feel I am no closer to resolving. The build publishes fine from my dev box but when I submit to GIT the publish generated from the CI build machine fails after install. The only difference being the OS, Win7 on dev box, win10 on build machine.

Are you aware of any additional logs that may help narrow down exactly which assembly reference is causing the issue?

It occurs before registration as the adxloader.log isn't yet created.
Posted 23 Jun, 2020 04:24:39 Top
Andrei Smolin


Add-in Express team


Posts: 17232
Joined: 2006-05-11
Hello Dan,

Compare the assemblies deployed by these installers to the same machine.

It may be so that you do not deploy an assembly the build/culture/bitness of which is different on your machine and on the CI machine.

Dan Evans writes:
It occurs before registration as the adxloader.log isn't yet created.


Before registration? Before load?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Jun, 2020 04:30:49 Top
Dan Evans




Posts: 27
Joined: 2014-06-18
Andrei Smolin writes:
Before registration? Before load?



Your correct - before load.

Andrei Smolin writes:
Compare the assemblies deployed by these installers to the same machine.


will give that a try. Thanks.
Posted 23 Jun, 2020 04:39:36 Top
Dan Evans




Posts: 27
Joined: 2014-06-18
I updated the project to target AnyCPU which has helped. I can now register the Addin via context menu within visual studio on the build machine. EDIT : and it loads fine in Excel.

But I am still unable to generate a publish that works - still seeing the same error as above.

This project was updated from a previous version of Addin-express. To update I did nothing other than remove the old version and install the new. Are there any steps that need to be done to the project in order to update.

I notice there is a redistrib folder under addin express - I have read the readme here.

my porject doesn't have a loader sub folder
I have adloader.dll.manifest, asxloader.[addinname].dll, and adxloader64.[addiname] all in the root.

could this be causing issues?
Posted 23 Jun, 2020 07:27:33 Top
Andrei Smolin


Add-in Express team


Posts: 17232
Joined: 2006-05-11
It can! You can create a new empty project and check whether your project follows the structure of the new one.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Jun, 2020 09:00:30 Top
Dan Evans




Posts: 27
Joined: 2014-06-18
Dan Evans writes:
It can!



It was!

Thankfully that was the last project to be updated, simply copying over the loader folder and including in my project, moving the old manifest folder in to the loader and removing the old adxloader dll's from the root got things back on track.

Thank you for the quick responses and your helpful insights.
Posted 24 Jun, 2020 07:16:26 Top
Andrei Smolin


Add-in Express team


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

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Jun, 2020 07:20:29 Top