I've various versions of the .NET Framework (versions 1.1 thru 4.0) installed on a remote machine running XP Professional. I've installed Reactive Extension too for good measure.
I also have an application which works on my machine because it references System.Threading found here: C:\Program Files\Microsoft Reactive Extensions\redist\desktopV2\System.Threading.dll
I have two versions of the DLL in the GAC also.
Two questions:
i) Why did Visual Studio decide that this is the version (instance) to reference when I chose from the list rather than browsing to to the file?
ii) Why does System.Threading not exist on the remote machine? (I thought it was a core part of the Framework)
Thanks
System.Threading.dll was added in .NET 4.0 (though the namespace System.Threading
has been around since v1). Rx includes a version of System.Threading.dll that was backported to .NET 3.5 SP1.
It sounds like you're targeting .NET 3.5. In this case, the runtime won't load a 4.0-only System.Threading.dll (obviously). Your loading would fail unless you included the Rx version of System.Threading.dll along with your program.
To answer the questions directly:
To solve your problem, either have your program target .NET 4.0 or include Rx's System.Threading.dll along with your program.
P.S. I recommend upgrading to the latest version of Rx. The desktopV2
folder hasn't been used for the last few releases. When upgrading, uninstall the old version first - it works better that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With