2

This has caused me quite the embaressment today. While I was demoing Rx 2.x features and capabilities, I tried to build a NuGet enabled project which I copied from another computer.

Everything was downloaded correctly, the references are there! but I can't compile.

These two below assemblies are causing the issue. I am wondering if anyone has faced this issue with restroing Rx assemblies into a .Net 4.5 project.

System.Reactive.Windows.Threading

Warning 11 The primary reference "System.Reactive.Windows.Threading, Version=2.1.30214.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.5". To resolve this problem, either remove the reference "System.Reactive.Windows.Threading, Version=2.1.30214.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

And System.Reactive.PlatformServices

Warning 26 The primary reference "System.Reactive.PlatformServices" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.5". To resolve this problem, either remove the reference "System.Reactive.PlatformServices" or retarget your application to a framework version which contains "System.Runtime.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

Couldn't compile:

Error 73 The type or namespace name 'IScheduler' could not be found (are you missing a using directive or an assembly reference?)
Error 74 The type or namespace name 'CompositeDisposable' could not be found (are you missing a using directive or an assembly reference?)

WeSam Abdallah
  • 1,050
  • 1
  • 10
  • 16

1 Answers1

1

My psychic debugger says this has something to do with either mixing references to .NET 4.0 and .NET 4.5 Rx DLLs in a project, or Microsoft.Bcl.Async.

Ana Betts
  • 73,868
  • 16
  • 141
  • 209
  • I think your physic mojo is on target! Fastest way to resolve is probably to uninstall/reinstall the nuget package Rx-Main - this will respect whatever .NET FX version you are using on that machine, but will leave it not matching the original. – James World Jun 06 '13 at 12:02
  • After looking into the references, I found that the Rx Dlls pulled by NuGet in lib\net45 were .Net v4.0 dlls. So the issue was in the NuGet package itself. – WeSam Abdallah Jun 10 '13 at 14:59