Skip to content

scriptcs crashes when native DLL's are present #913

@sbedford

Description

@sbedford

I'm getting a BadImageFormatException when trying to load the LibGit2Sharp library in a csx file.

I'm running ScriptCS version 0.13 on Windows 8.1 x64 - see https://gist.github.com/sbedford/472d9fa63a8304ce0b2f for a reproduction.

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'git2-e0902fb.dll' or one of its dependencies. The module was expected to contain an assembly manifest. ---> System.BadImageFormatException: Could not load file or assembly 'git2-e0902fb.dll' or one of its dependencies. The module was
expected to contain an assembly manifest.
--- End of inner exception stack trace ---
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at ScriptCs.AppDomainAssemblyResolver.AddAssemblyPaths(IEnumerable1 assemblyPaths) at ScriptCs.ScriptServicesBuilderFactory.Create(ScriptCsArgs commandArgs, String[] scriptArgs) at ScriptCs.Command.CommandFactory.<>c__DisplayClass2.<CreateCommand>b__0() at ScriptCs.Command.DeferredCreationCommand1.Execute()
at ScriptCs.Command.CompositeCommand.Execute()
at ScriptCs.Program.Main(String[] args)

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions