Reactive: System.Reactive (3.1.0) forces dependency on NETStandard.Library

Created on 15 Nov 2016  路  17Comments  路  Source: dotnet/reactive

I am not sure if that is the intention, but we cannot use System.Reactive (3.1.0) in .NET 4.5
There seems to be a dependency on NETStandard.Library.1.6.0 and other .NETCore libraries.

image

Is there a way we can install 3.1.0 without these dependencies? Or are we stuck with 3.0.0?

enhancement [area] Ix [area] Rx

All 17 comments

+1

I am also running into an issue w/ 3.1.0.0, where the identity continues to be 3.0.0.0? Additionally, it appears the dll in .NETStandard is versioned 3.0.1000.0, and the net45 version is 3.0.0.0. This is not only confusing me greatly, but is confusing my poor tests which are now breaking because of this. 馃槢 I will rollback until I get more clarity around this.

cc @onovotny for :eyes:

Two separate issues:

  1. Dependency on NETStandard.Library for all projects. This was done to ensure all referenced assemblies are correctly unified against all of the framework versions. It's possible that the net4x versions may be able to do without that and we can investigate that for the next release. In the interim, that should not block anything as using NETStandard.Library is fully supported for net45. My recommendation would be to use project.json for your NuGet packages instead of packages.config as it provides a huge number of benefits, including transitive dependencies. My blog shows you how: https://oren.codes/2016/02/08/project-json-all-the-things/ and there's a converter add-in here: https://marketplace.visualstudio.com/items?itemName=TaylorSouthwickMSFT.NuGetPackagetoProjectjsonConverter
  2. Version numbers. Those are correct as per #205. You can see the logic implemented in the GlobalAssemblyVersion.cs file in Ix.NET\Source. System.Interactive cross-compiles for netstandard1.0 and net45. Thus, a desktop .NET app will see a 3.0.1000.0 version while other project types will see the 3.0.0.0 version. This is inline with the API versioning mentioned in #205 discussion. For desktop .NET Projects, the build system should generate binding redirects automatically that unify this.

Ahhh thank you @onovotny for the explanation! I am using NuGet3 which doesn't generate those redirects, unfortunately (captured in https://github.com/NuGet/Home/issues/3372 please upvote :) ). I will get in the habit of installing a package in an empty class library (NuGetv2) and see if it generates anything there before dropping complaints in a repo. 馃槃

@Mike-EEE For the binding redirects, it should not be NuGet that's doing it...it's done as part of the build now.

For older projects, they may not have AutoGenerateBindingRedirects set though:

https://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.110).aspx

We can fix this for desktop .NET for Ix and Rx. Note that for all other platforms, the full NETStandard.Library references will still be needed.

Ah @onovotny I have another layer of complexity in my solution that might be causing my problems in this case. That is, I am running PostSharp and it runs in its own AppDomain during build. It also does not yet support NuGet3.0 so it requires specific configuration to work property. After a bunch of trial and error I was able to get everything configured and working properly again. 馃憤

@Mike-EEE @mot256 Can you please try the latest 3.1.1 version from the CI feed (https://dotnet.myget.org/gallery/rx) and confirm it works as expected for you?

This should be in 3.1.1-build-00006 and later.

We can get this tagged and pushed publically very soon.

Ah, I didn't see the build number until now, @onovotny. I was able to install 00002, but that doesn't have any assemblies. It is also the only build that is available when I connect to that feed (and when I view it here). Is there another location I should be looking at, perhaps? Or maybe a permissions issue?

@onovotny Just tried, System.Reactive 3.1.1-build-00002 still pulls the whole .NET Standard with it. I suspect that's because System.Reactive.Interfaces is still NETStandard.Library-only.

Please look at 00006. MyGet's indexing was being slow, should be showing up now.

@onovotny Tried 00006. Now it's much better, but System.Reactive (or maybe one of its dependencies) still tries to pull some extra packages:
image

@krs500 Build 00007 should have that addressed if you can give that a shot.

@onovotny The build 00007 now installs only what is needed 馃憤

Great, 3.1.1 is on NuGet now.

A little late to the party, but I was able to upgrade to 3.1.1 with everything "as configured" and all my tests passed with no problem. So, we are good on my side, too. 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clairernovotny picture clairernovotny  路  5Comments

oliverjanik picture oliverjanik  路  4Comments

Mike-E-angelo picture Mike-E-angelo  路  5Comments

jeremyVignelles picture jeremyVignelles  路  5Comments

Sathyaish picture Sathyaish  路  3Comments