Skip to content

BadImageFormatException #9

@Cronan

Description

@Cronan

Hi, I have a large number of dependant files, x86 and AnyCpu - a mix of custom and third-party libraries. I get this error trying to run:

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'file:///c:\ExcelDna.dll' or 
one of its dependencies. An attempt was made to load a program with an incorrec
t format.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Runtim
eAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntro
spection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, Ru
ntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIn
trospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValu
e, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackM
ark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at ExcelDnaDoc.Utility.ModelHelper.<>c__DisplayClass3_0.<CreateAddInModel>b__0(ExternalLibrary library) in C:\Users\d
ave\Documents\GitHub\ExcelDnaDoc\src\ExcelDnaDoc\Utility\ModelHelper.cs:line 119
   at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityCo
mparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at ExcelDna.Documentation.Models.AddInModel.<get_Functions>d__13.MoveNext() in C:\Users\dave\Documents\GitHub\ExcelDn
aDoc\src\ExcelDna.Documentation\Models\AddInModel.cs:line 19
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at CompiledRazorTemplates.Dynamic.debbecfff.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\_git\RazorE
ngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 127
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model) in c:\_git\RazorEngine\src\Core\RazorEngine.Core\Razor.c
s:line 263
   at ExcelDnaDoc.Templates.ViewBase`1.Publish() in C:\Users\dave\Documents\GitHub\ExcelDnaDoc\src\ExcelDnaDoc\Views\Vie
wBase.cs:line 53
   at ExcelDnaDoc.HtmlHelp.Create(String dnaPath, String helpSubfolder) in C:\Users\dave\Documents\GitHub\ExcelDnaDoc\sr
c\ExcelDnaDoc\HtmlHelp.cs:line 33
   at ExcelDnaDoc.Program.Main(String[] args) in C:\Users\dave\Documents\GitHub\ExcelDnaDoc\src\ExcelDnaDoc\Program.cs:l
ine 55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions