I was trying to get a library that required System.Threading.Dll to work with my .NET 3.5 web application project. Since 3.5 doesn't have System.Threading.Dll, I followed a tip to install the Reactive extensions because it has a backported version of System.Threading for 3.5.
The attempt still failed and after enough frustration I backed out abandoned the branch entirely.
Now in my original branch that didn't have any of the experimental work, I'm getting this error.
[BadImageFormatException: Could not load file or assembly 'System.Reactive.Windows.Threading' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
The error makes sense. What doesn't make sense is why is it even attempting to load the System.Reactive.Windows.Threading assembly in the first place? There is no reference to it in the solution. I even went as far as uninstalling the extensions altogether from the OS.
Here's the binding info.
=== Pre-bind state information ===
LOG: User = IIS APPPOOL\.NET v2.0
LOG: DisplayName = System.Reactive.Windows.Threading
(Partial)
LOG: Appbase = file:///C:/GitHub/v44/Web/
LOG: Initial PrivatePath = C:\GitHub\v44\Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\GitHub\v44\Web\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\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:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/65a2449d/ebe221c1/System.Reactive.Windows.Threading.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/65a2449d/ebe221c1/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading.DLL.
LOG: Attempting download of new URL file:///C:/GitHub/v44/Web/bin/System.Reactive.Windows.Threading.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
What is making .NET think it needs to load this assembly?