I'm puzzled about an exception that I get in a fairly simple project from Rx.
I googled the BadImageFormatException
and found it's thrown when a platform-specific assembly is attempted to be loaded into an incompatible process.
The platform settings of my project are "Any CPU" though, and System.Reactive.Core.dll
itself is too, obviously.
The stack trace's top is in Rx:
the sources for which read
protected override void OnNextCore(T value)
{
_onNext(value);
}
_onNext
being an Action<...>
.
My immediate problem is that I don't know how to figure which assembly actually fails to load - the information isn't in the exception I'm getting, and I don't know where else to get it from either.
I don't think it's actually anything about Rx, but what is it?
Anyone any ideas?
EDIT 1:
Here's the result of fuslogvw on a non-debugger run, set to "show all bindings", together with the stack trace I'm getting from the exception. Setting fuslogvw to show only failed bindings gives me nothing at all.
EDIT 2:
I also made sure "prefer 32 bit" is set to off in all assemblies that are from me, especially the main console app.
EDIT 3:
Absolutely baffling: I now broke the solution down, removed all dependencies including rx, and copy-pasted the sources to a new solution with all projects straight out of the wizard - it's still happening.
I tried it on two other machines, still happening.
What the hell is this!?
I my desperation, here're the sources. Perhaps someone smarter than me is curious enough: