Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Reactive 3.0.0 package does not work with Xamarin Studio #213

Closed
frankbuckley opened this issue Jul 3, 2016 · 18 comments

Comments

Projects
None yet
8 participants
@frankbuckley
Copy link

commented Jul 3, 2016

Adding the System.Reactive package to a Xamarin iOS project in Xamarin Studio 6.0.1 running on OSX results in an error:

Adding System.Reactive...
The 'System.Reactive 3.0.0' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.7.0'.

I am guessing this may waiting for updated Nuget support in XS.

However, with the old Rx packages unlisted on Nuget, this makes using Reactive Extensions in Xamarin projects difficult.

@onovotny

This comment has been minimized.

Copy link
Member

commented Jul 3, 2016

I believe that the alpha channel of Xamarin Studio supports project.json. As for the stable/beta channel, I think that's coming soon but you'd need to ask Xamarin. /cc @mhutch

For now, I'd stuggest trying out the alpha channel or using Visual Studio for Xamarin projects as many libraries are busy updating their packages for netstandard and all of them will require NuGet 2.12 to work correctly.

@onovotny onovotny added the external label Jul 4, 2016

@aritchie

This comment has been minimized.

Copy link

commented Jul 4, 2016

Is possible to restore rx-main 2.2.5 in the meantime on nuget? I know the push is for .netcore everywhere, but not everyone is ready for the move including xamarin.

@onovotny

This comment has been minimized.

Copy link
Member

commented Jul 4, 2016

Rx-Main is still on NuGet, just unlisted. It can be explicitly installed by using the Package Manager Console Install-Package Rx-Main -Version 2.2.5

Xamarin Studio does have the Package Manager Console: http://lastexitcode.com/blog/2014/06/22/NuGetPowerShellConsoleForXamarinStudio/

@aritchie

This comment has been minimized.

Copy link

commented Jul 4, 2016

If the GUI doesn't see it, then I have bunch of people that need to learn how to use the nuget console. Why not just marked the package title with [DEPRECATED] and remove it in the semi-near future?

@frankbuckley

This comment has been minimized.

Copy link
Author

commented Jul 4, 2016

Unlisting the compatible packages does seem to cause unnecessary friction while the NuGet support is not yet available in stable Xamarin releases.

For example, it breaks CI build servers that attempt to pull the required NuGet packages using the Xamarin-provided NuGet client - for example, the Visual Studio Team Services agent for OSX. This is how we noticed the problem with the new System.Reactive packages. Installing an alpha Xamarin release on a CI server feeding beta releases is not a viable option, so we backed out the update commit.

A warning note attached to the System.Reactive 3.0.0 release might save others the inconvenience.

@onovotny

This comment has been minimized.

Copy link
Member

commented Jul 4, 2016

We did consider that option, but in the end it was decided that as this is a very short term issue -- Xamarin Studio support is coming -- that unlisting the packages was better to reduce the complexity of the search results.

As the packages are not "gone", any existing projects and builds should continue to work.

@frankbuckley How is a CI build using Rx-Main 2.2.5 failing? Is there a log? NuGet doesn't care about hidden/visible status while doing restores.

@frankbuckley

This comment has been minimized.

Copy link
Author

commented Jul 4, 2016

Restore of Rx-* 2.2.5 packages is fine - as long as you already have them defined in your projects - obviously not if you create a new project and want to add them via GUI (or even know what to look for on NuGet if adding manually).

What happened to us was we updated to System.Reactive 3.0.0 packages using Visual Studio. Everything built OK on VS. Checked in, then a CI build on an OSX machine failed, alerting us to the problem. We reverted the update commit, so going back to Rx-* packages and that works.

@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2016

Let's tease apart the two distinct scenarios here:

Checked in, then a CI build on an OSX machine failed, alerting us to the problem.

@frankbuckley I want to hear about this scenario further - is this related to the nuget version on the agent being less than the minimum 2.12 and it trying to restore the new System.Reactive packages?

If that's the case, I'm not sure how to resolve this on our end. Installing alpha channel stuff on build infrastructure isn't a great solution, but changes to how the netstandard stuff works inside NuGet necessitated us bumping the minVersion as part of the 3.0.0 release - see #198.

If the GUI doesn't see it, then I have bunch of people that need to learn how to use the nuget console.

@aritchie it's been a while since I've used XS, but back then I was on alpha channel so I'm definitely not the typical use case here.

Personally, I'm kind of keen to drag people (and companies) into this brave new world by sharing a bit of this friction. Introducing new package names and leaving the existing ones untouched means that there currently isn't a migration path from Rx-Main to System.Reactive. Full disclosure: I'm currently cursing a major tooling company for not having tooling compatible with .NET Core available that impacts another side-project I'm maintaining.

Having said all that, what sort of timelines are we talking about for this stuff to land in the beta and stable channels of XS? Even a rough figure based on historical experience will help here.

@jtourlamain

This comment has been minimized.

Copy link

commented Jul 5, 2016

@aritchie you can still install Rx-Main on new projects using Xamarin Studio. Go to Xamarin Studio -> Add-ins. Search in the gallery for nuget and install the "Nuget Package Management Extension (this is a great plugin to install your nuget packages via commands). Restart your Xamarin Studio.
Create a new solution. Go to View -> Pads -> Package Console Extension. Now you can use the command:

Install-Package Rx-Main -Version 2.2.5
@frankbuckley

This comment has been minimized.

Copy link
Author

commented Jul 5, 2016

@shiftkey - yes - the version on the agent is (I presume) provided by Xamarin Studio (/usr/bin/nuget) and gives this error message on restore - "The 'System.Reactive 3.0.0' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.7.0'."

It looks like Xamarin have updated NuGet support, but this is only in the Alpha channel so far:

https://bugzilla.xamarin.com/show_bug.cgi?id=34694

This release is still some way off stable:

https://releases.xamarin.com/alpha-preview-2-cycle-8/

It might be possible to download the binaries from here and direct the build agent to use them, but I have not tried:

https://github.com/mono/nuget-binary

@mhutch

This comment has been minimized.

Copy link
Member

commented Jul 5, 2016

Sorry, it'll be a few months until Xamarin Studio 6.1, which supports NuGet 3.4.3, will have a stable release. I'm investigating whether we can backport 2.12 to Xamarin Studio 6.0, but it won't be easy, so if possible I would suggest working around this by adding Xamarin framework specific builds of the implementation (the "switch" assembly) to the package.

Also the command-line nuget on Mac comes from Mono, not from XS, so that's another thing that will need to be upgraded.

cc @mrward

@onovotny

This comment has been minimized.

Copy link
Member

commented Jul 5, 2016

@mhutch Unfortuately, even if we did that, we still could not change the minClientVersion below 2.12 as the package will physically fail to install on earlier versions of NuGet. It'll complain of multiple libraries/depenencies of the same name due to it treating all unrecognized frameworks as Unknown0.0. It'd see netstandard1.0, netstandard1.1 and netstandard1.3 all as Unknown0.0 and fail. We tried this out prior to release to see what'd happen.

@tpitman

This comment has been minimized.

Copy link

commented Jul 20, 2016

I have switched to the alpha channel so that I can get the new Reactive 3.0.0.

The package was not restored, but I am still getting an error red x on the references. It says:

Assembly not found for framework mono / .NET 4.5

This is on all of the Reactive references.

The packages all look fine in the packages folder.

How do I fix this?

@tpitman

This comment has been minimized.

Copy link

commented Jul 20, 2016

I should have thought of this before posting, but I was a bit frustrated, so I posted and then tried it.

I removed the packages and added them again and it worked.

So this project came from another developer using Xamarin Studio on Linux. He committed to Git and I did a pull. Is there maybe something wrong with the package manager that caused it to not line up correctly?

I did notice that when I do a git pull, the references to the reactive stuff are all just right in the references folder where after I remove and add them back they are in a subfolder of references called "From Packages".

Can someone explain?

@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2016

@tpitman I'm not sure how much we can help on the Rx.NET side with this issue - @mhutch what's the best avenue to route a potential issue with the package manager bits in the alpha channel?

@mrward

This comment has been minimized.

Copy link

commented Jul 20, 2016

@tpitman - The From Packages folder in Xamarin Studio shows references that are from NuGet packages. This is done based on the hint path provided by the reference in the project file (.csproj). So it sounds like the original hint paths are incorrect since they are not displayed in that folder but without seeing the .csproj file this is a guess. It would also be useful to know what version of Xamarin Studio is being used on Linux.

@onovotny

This comment has been minimized.

Copy link
Member

commented Jul 26, 2016

The beta channel now has support for .NET Standard 1.6/NuGet 2.12:
https://releases.xamarin.com/beta-release-cycle-7-service-release-1-updated/

If you're on a PC, make sure to also update the Mac components for iOS to work.

@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2016

This is now available on the stable channel - https://releases.xamarin.com/stable-release-cycle-7-service-release-1/

Let me know if there's anything else that needs to be addressed here.

@shiftkey shiftkey closed this Aug 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.