1

Closed

Rxx1.3 appears broken on with Rx2 on .NET 4 (WinXP)

description

When I add Rx 2.1 and Rxx 1.3 to a .NET 4.0 project in Vs2010 on WinXP I get compilation failures.
Sample main method

class Program
    {
        static void Main(string[] args)
        {
            var source = Observable.Empty<Unit>();
            var connectable = source.Publish();
            connectable.Prime<Unit>();
        }
    }
csproj snippet
<ItemGroup>
    <Reference Include="Rxx">
      <HintPath>..\..\packages\Rxx.1.3.4451.33754\lib\net40\Rxx.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Reactive.Core">
      <HintPath>..\..\packages\Rx-Core.2.1.30214.0\lib\Net40\System.Reactive.Core.dll</HintPath>
    </Reference>
    <Reference Include="System.Reactive.Interfaces">
      <HintPath>..\..\packages\Rx-Interfaces.2.1.30214.0\lib\Net40\System.Reactive.Interfaces.dll</HintPath>
    </Reference>
    <Reference Include="System.Reactive.Linq">
      <HintPath>..\..\packages\Rx-Linq.2.1.30214.0\lib\Net40\System.Reactive.Linq.dll</HintPath>
    </Reference>
    <Reference Include="System.Reactive.PlatformServices">
      <HintPath>..\..\packages\Rx-PlatformServices.2.1.30214.0\lib\Net40\System.Reactive.PlatformServices.dll</HintPath>
    </Reference>
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
and the error message is
Program.cs(16,13): error CS0012: The type 'System.Reactive.Subjects.IConnectableObservable`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Reactive, Version=1.0.10621.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Program.cs(16,13): error CS1928: 'System.Reactive.Subjects.IConnectableObservable<System.Reactive.Unit>' does not contain a definition for 'Prime' and the best extension method overload 'System.Reactive.Linq.Observable2.Prime<TSource>(System.Reactive.Subjects.IConnectableObservable`1<TSource>)' has some invalid arguments

Program.cs(16,13): error CS1929: Instance argument: cannot convert from 'System.Reactive.Subjects.IConnectableObservable<System.Reactive.Unit>' to 'System.Reactive.Subjects.IConnectableObservable`1<System.Reactive.Unit>'
I believe that the error is a hard reference to version in 1.3\source\Rxx\Rxx.csproj (ln ~190)

    <Reference Include="System.Reactive, Version=1.0.10621.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition=" '$(Experimental)' != True ">
      <HintPath>..\..\packages\Rx-Main.1.0.11226\lib\Net4\System.Reactive.dll</HintPath>
    </Reference>
Closed Apr 8, 2013 at 6:18 PM by davedev
Rxx 1.3 only supports Rx 1.x.
Rxx 2.x has not been released as a discrete download, though you can build it yourself from the source code. The source code currently references the latest version of Rx on NuGet.

See the following discussion for more info:
https://rxx.codeplex.com/discussions/399501

comments

LeeCampbell wrote Apr 9, 2013 at 9:20 AM

Thanks for the quick response. Apologies for not finding the linked conversation (I did have a look for realted issues for logging this).

The requirement to have vs2012 makes this a non starter (this project runs WinXP so no .NET4.5, no VS2012). Thanks anyway. I will pull the classes that we use and bring them into our local project :-(

davedev wrote Apr 9, 2013 at 7:38 PM

Hey Lee, thanks for reporting the issue and sorry for the inconvenience. I'll consider deploying a package for 2.0 in the near future.

davedev wrote Apr 9, 2013 at 7:42 PM

Hey Lee, thanks for reporting the issue and sorry for the inconvenience. I'll consider deploying a package for 2.0 in the near future.