2

I'm using the latest version of xamarin forms (as of 12/17/17) and I'm unable to use the following line in akavache:

await BlobCache.UserAccount.InsertObject(key, value);

Without getting the error:

The type 'Unit' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

v2.2.5.0 is not on nuget. I had it working before I thought but not it isn't showing so I'm wondering if I messed something up. I installed the latest version from nuget which is 3.1.1 but still have the error.

What can I do?

Edit:

I also made an issue on Github: https://github.com/akavache/Akavache/issues/399

SolidSnake4444
  • 3,183
  • 5
  • 35
  • 58
  • What platform is failing with this error(iOS/Android)? Secondly, what version of `Akavache` are you using? It sounds like you're using the `Alpha` version given the naming. Secondly, please cross reference issues in Github to help others: https://github.com/akavache/Akavache/issues/399 – Jon Douglas Dec 17 '17 at 22:01
  • You should be able to manually install `System.Reactive` 3.1.1 (Stable) which should bring in the appropriate dependencies such as `System.Reactive.Core` 3.1.1 – Jon Douglas Dec 17 '17 at 22:03
  • Otherwise if you are using .NET Standard, you would probably be more interested in the `Preview` channel. – Jon Douglas Dec 17 '17 at 22:04
  • @JonDouglas The .NET standard project is failing so it isn't specifically iOS or Android but I am trying in general for iOS/Android/UWP. What do you mean by cross reference? I made that issue on Github, did you want me to provide the links to the question? My akavache version is 5 from nuget. I just installed System.Reactive 3.1.1 and I'm still getting the same issue. Through autocomplete I see System.Reactive.Unit but no System.Reactive.Core.Unit. – SolidSnake4444 Dec 17 '17 at 22:11
  • By cross-referencing, you help save other people's time in-case it gets answered on one and not the other. – Jon Douglas Dec 18 '17 at 00:06

1 Answers1

3

You'll have to install this version of Akavache https://www.nuget.org/packages/akavache/6.0.0-alpha0038

And then also just make sure you only have version 3.1.1 of System.Reactive installed everywhere and not 2.2.5 anywhere

Shane Neuville
  • 2,037
  • 13
  • 17
  • 1
    This got rid of the error. Thank you. Hopefully it will be out of alpha soon as the word alpha scares me. – SolidSnake4444 Dec 19 '17 at 18:02
  • 1
    Don't worry the person (me) that converted it over to version 3.1.1 did a perfect job. I've been using it in production a number of months. Fundamentally it's all the same code as V5. Only differences are: Netstandard, Rx3.1.1, and the blocking collection was swapped out for the one in NetStandard opposed to a custom one. I've been using it in prod now for about 4 months without any issues. – Shane Neuville Dec 19 '17 at 23:26
  • All my nugets where pointed to 6.0.0alpha but somehow in my Droid.csproj there was still a reference that pointed to the 2.2.5 version. Hope this helps somebody – Marc Bruins Feb 26 '18 at 09:17
  • 6.0.0-alpha0038 is not available anymore, Akavache is now at v6.0.20. v6.0.20 requires System.Reactive >= 4.1.0, System.Reactive 3.1.1 is installed. But I can't upgrade because Fusillade & Punchclock packages require System.Reactive < 4.0.0. Any ideas? – Remco te Wierik Sep 06 '18 at 13:32
  • alpha should still be available https://www.nuget.org/packages/akavache/6.0.0-alpha0038 – Shane Neuville Sep 06 '18 at 15:24