Roslyn: c# Interactive System.BadImageFormatException: Could not load file or assembly

Created on 22 Dec 2015  Â·  10Comments  Â·  Source: dotnet/roslyn

c# interactive window on Visual Studio 2015 Update 1 seems have problem when referencing x64 dll as we get System.BadImageFormatException exception

Area-Interactive Feature Request

Most helpful comment

Any news on this? I’d really like to use the SharePoint DLLs from within the Interactive C# window but they require a 64bit process… :/

All 10 comments

The hosting process is 32bit. We don't support 64bit currently, it's on our backlog though.

What needs to be done to support this? I'd love to use C# interactive to explore some >4GB datasets.

Note that when running CSI directly, there is no issue.

Any news on this? I’d really like to use the SharePoint DLLs from within the Interactive C# window but they require a 64bit process… :/

C# interactive with 64bit would be very useful

PS: And also please enable multiple C# interactive views and graphic support ala Apple Swift Playground, Python, etc. etc.

When working in C# interactive and database drivers in 64 bit, I get this error.

It would be great to configure the c# interactive in VS to 64 bit

What's the state of this now? I've got a x86 dll (using com components) and with VS 2017.7.3 I can't load the assembly because C# interative is running in x64 (also see https://stackoverflow.com/questions/49067671/vs-2017-c-sharp-interactive-is-not-a-valid-win32-application).

So i guess if you want to have C# Interactive on x86 dll you've ought to use VS2015, and if you want C# interactive on x64 you ought to use VS2017.

Or am I missing something?

It would be nice if VS2017 C# interactive would support both x64 and x86.

Note: error:

Could not load file or assembly '***' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

  • AsyncTaskMethodBuilder.Start(ref TStateMachine)

It seems that some change inadvertently flipped the bitness to 64bit. Will investigate.

Whatever that change was, can we get a toggle in the settings? 😅

Fixed by https://github.com/dotnet/roslyn/pull/28006.

The default stays as 64. #reset 32 switches to 32-bit, #reset 64 switches to 64-bit.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gafter picture gafter  Â·  279Comments

gafter picture gafter  Â·  258Comments

MadsTorgersen picture MadsTorgersen  Â·  249Comments

MadsTorgersen picture MadsTorgersen  Â·  120Comments

mattwar picture mattwar  Â·  190Comments