I have an Excel addin. It depends on an Assmbly which I register in the GAC.
addinSpy gives this warning (sorry it does not format well)
Add-in DLL path is not found. System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files (x86)\Poly\PolyAddins\PolyExcel\DBExcelAddin.dll' or one
of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
File name: 'file:///C:\Program Files (x86)\Poly\PolyAddins\PolyExcel\DBExcelAddin.dll'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean
throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean
throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean
forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile)
at AddInSpy.AssemblyScanner.GetAssemblyInfo(String fileName, String hostName, Boolean isVstoAddIn)
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable C:\Users\MCH02080\Downloads\AddInSpy.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = Username
LOG: Where-ref bind. Location = C:\Program Files (x86)\Poly\PolyAddins\PolyExcel\DBExcelAddin.dll
LOG: Appbase = file:///C:/Users/XXXXXXXX/Downloads/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
LOG: This is an inspection only bind.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Poly/PolyAddins/PolyExcel/DBExcelAddin.dll.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
I specifically dont understand what "Attempting download of new URL file:///C:/Program Files (x86)/Poly/PolyAddins/PolyExcel/DBExcelAddin.dll." fails as that is exactly where it is.
So I assume Fusion is the next step to try and work out what is going on.
*** Assembly Binder Log Entry (21.03.2014 @ 10:07:51) ***
The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Microsoft Office\Office12\EXCEL.EXE
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = MyUserName
LOG: DisplayName = DBExcelAddin, Version=1.1.9.0, Culture=neutral, processorArchitecture=MSIL
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: DBExcelAddin, Version=1.1.9.0, Culture=neutral, processorArchitecture=MSIL | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Program Files (x86)/Poly/PolyAddins/PolyExcel/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = EXCEL.EXE
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Poly/PolyAddins/PolyExcel/DBExcelAddin.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files (x86)\Poly\PolyAddins\PolyExcel\DBExcelAddin.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: DBExcelAddin, Version=1.1.9.0, Culture=neutral, PublicKeyToken=null
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
WRN: A duplicate assembly was found while copying the assembly item to the cache.
LOG: Binding succeeds. Returns assembly from C:\Users\Username\AppData\Local\assembly\dl3\AB9LQY47.X7Y\AANNZTWA.2TD\2f8e8cc8\00da0eb0_3141cf01\DBExcelAddin.dll.
LOG: Assembly is loaded in default load context.
I am positive it is telling me what to do but I dont understand it so could you please let me know.