Can't register/un-register or install published add in

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

Can't register/un-register or install published add in
 
mantooth




Posts: 13
Joined: 2014-05-18
I have an add in that was recently published, however when trying to install
on my machine I get the following exception

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


The exception is for assembly adxlauncher, Version=7.5.4072.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965

I think it would be relevant to mention that when I started this project,
I was using adxloader version=7.5.4072.0 but recently, while working on the project I
was prompted to update to the newest loader version=7.7.4087.0. Also, I
was able to debug my application in Excel as recently as yesterday. The real problems
surfaced when I unregistered the project, then tried to install the published version
on my machine.


In addition to not being able to install, I can no longer register/un-register the
project from Visual Studio. I am putting both exception logs below

1) Installation Error
=====================


(Inner Exception)
Date and Time: 7/22/2015 4:19:26 PM

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Users/me/AppData/Local/Apps/2.0/296E63HL.YZH/O7Y2Q313.BZ9/offi..ddin_73a332987f729108_0001.0000_13811444d898e37f/adxlauncher.exe
Assembly Full Name: adxlauncher, Version=7.5.4072.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 7.5.4072.2005

Exception Source:
Exception Type: System.IO.FileLoadException
Exception Message: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Exception Target Site: Object reference not set to an instance of an object.

---- Stack Trace ----

(Outer Exception)
Date and Time: 7/22/2015 4:19:26 PM

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 'MyAddIn, PublicKeyToken=577c01ebb3cc9797' 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


2) Registration Error
=====================


Date and Time: 7/23/2015 11:45:47 AM

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Windows/assembly/GAC_MSIL/AddinExpress.Design.2005/7.5.4072.2005__4416dd98f0861965/AddinExpress.Design.2005.dll
Assembly Full Name: AddinExpress.Design.2005, Version=7.5.4072.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 7.5.4072.2005

Exception Source: mscorlib
Exception Type: System.IO.FileLoadException
Exception Message: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Exception Target Site: RegisterAssembly

---- Stack Trace ----
AddinExpress.Projects.Common.Registrator.RegisterAssembly(rtmType As Int32, bMode As Int32, projectFolder As String, configurationName As String, primaryOutput As String, projectKind As String,

projectFullName As String, manifestXllClass As String, manifestPublicToken As String, manifestAssemblyName As String, registerOutputState As Boolean, prismBugMode As Boolean, expressEdition As Boolean)
AddinExpress.Design.2005.dll: N 00000 (0x0) JIT
AddinExpress.Projects.Common.Registrator.DoAfterBuild(scope As vsBuildScope, action As vsBuildAction)
AddinExpress.Design.2005.dll: N 0570 (0x23A) IL

========================================================================================================================

I am guessing that the errors are related.

Any help is much appreciated.
Posted 23 Jul, 2015 11:19:42 Top
mantooth




Posts: 13
Joined: 2014-05-18
Update:

I am now able to register/un-register my add in from visual studio.

To do so, I deleted the bin folder, cleaned my solution, and then rebuilt.

However, Im still getting the same error when trying to install the add in.
Posted 23 Jul, 2015 12:47:44 Top
Andrei Smolin


Add-in Express team


Posts: 18826
Joined: 2006-05-11
Hello,

mantooth writes:
Could not load file or assembly 'MyAddIn, PublicKeyToken=577c01ebb3cc9797' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


This typically occurs when the set of assemblies deployed differs from the assemblies built. Say, this occurs if you build your add-in with version 2 of a dependency assembly but deploy version 1 of that dependency.


Andrei Smolin
Add-in Express Team Leader
Posted 24 Jul, 2015 08:26:42 Top
mantooth




Posts: 13
Joined: 2014-05-18
Ok, thank you Andrei, it seems as if that was the case. In the end, putting the original adxloader back into the project fixed my issue.
Posted 24 Jul, 2015 19:09:44 Top