CBL 2.0.0 NuGets iOS/Android won't install

Removed the old NuGets from projects. Trying new packages from today (12 April).

Install in iOS project:

Could not install package ‘Couchbase.Lite.Support.iOS 2.0.0’. You are trying to install this package into a project that targets ‘Xamarin.iOS,Version=v1.0’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Install in Android project:

Could not install package ‘Couchbase.Lite.Support.Android 2.0.0’. You are trying to install this package into a project that targets ‘MonoAndroid,Version=v8.1’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

There was a debacle earlier today where I was unable to push the support packages but that should all be cleared up now. If it still persists I will check what is going on.

1 Like

Stuff like this makes me very nervous so I went ahead and checked anyway, and I was able to install the packages successfully. Try clearing your nuget http cache, etc. As I mentioned before there was a period of a few hours where only Couchbase.Lite was uploading and its dependencies weren’t due to some misunderstandings about the Couchbase prefix reservation on nuget.org resulting in a rejected upload.

I deleted Couchbase from global-packages and local cache. Restarted Visual Studio. Tried a new solution. It does not install at the moment.

Attempting to gather dependency information for package ‘Couchbase.Lite.Support.iOS.2.0.0’ with respect to project ‘MYAPP.iOS’, targeting ‘Xamarin.iOS,Version=v1.0’
GET Couchbase.Lite.Support.iOS
OK Couchbase.Lite.Support.iOS 544ms
Total number of results gathered : 102
Gathering dependency information took 575.71 ms
Summary of time taken to gather dependencies per source :
https://www.nuget.org/api/v2/ - 554.36 ms
Attempting to resolve dependencies for package ‘Couchbase.Lite.Support.iOS.2.0.0’ with DependencyBehavior ‘Lowest’
Resolving dependency information took 0 ms
Resolving actions to install package ‘Couchbase.Lite.Support.iOS.2.0.0’
Resolved actions to install package ‘Couchbase.Lite.Support.iOS.2.0.0’
Retrieving package ‘Couchbase.Lite.Support.iOS 2.0.0’ from ‘Official NuGet Gallery’.
GET https://www.nuget.org/api/v2/package/Couchbase.Lite.Support.iOS/2.0.0
OK https://www.nuget.org/api/v2/package/Couchbase.Lite.Support.iOS/2.0.0 687ms
Acquiring lock for the installation of Couchbase.Lite.Support.iOS 2.0.0
Acquired lock for the installation of Couchbase.Lite.Support.iOS 2.0.0
Installing Couchbase.Lite.Support.iOS 2.0.0.
Completed installation of Couchbase.Lite.Support.iOS 2.0.0
Install failed. Rolling back…
Package ‘Couchbase.Lite.Support.iOS.2.0.0’ does not exist in project ‘VECMAP.iOS’
Package ‘Couchbase.Lite.Support.iOS.2.0.0’ does not exist in folder ‘/Users/myuser/Projects/MyApp/MyApp.Mobile/packages’
Executing nuget actions took 3.11 sec
Could not install package ‘Couchbase.Lite.Support.iOS 2.0.0’. You are trying to install this package into a project that targets ‘Xamarin.iOS,Version=v1.0’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I manually downloaded the NuGets from nuget.org and those don’t work either.

I think I’ve found the problem. I was using Windows to test, and on Mac the package does not unzip correctly. I will have to reupload the package (I run a script on the internal nuget package to transform it from prerelease to release and apparently Windows powershell zips things in a dumb way…)

If you want to work around the problem I think you can navigate to the nuget folder, and notice that all the files there are filenames\like\this. If you manually change things to reflect the structure that it WOULD be if those were directories then it should work. Or you can wait until I push a 2.0.0.1 tomorrow.

I tried that, but

now I get System.BadImageFormatException on Couchbase.Lite.Support.iOS.Activate():

Could not resolve field token 0x04000001, due to: Could not load type of field ‘Couchbase.Lite.Support.iOS:_Activated’ (0) due to: Could not load file or assembly ‘Couchbase.Lite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. assembly:Couchbase.Lite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null type: member: assembly:/Users/myuser/Library/Developer/CoreSimulator/Devices/DC1ECE18-0B97-4F29-BA58-2F8BD5D17C34/data/Containers/Bundle/Application/F3CD6CB7-78C5-46C9-9183-F070357AB1B3/MYAPP.iOS.app/Couchbase.Lite.Support.iOS.dll type:iOS member:

And a System.IO.FileNotFoundException on Couchbase.Lite when building for Android.

Tried on Windows desktop. Solution with:

  • .NET Framework 4.7.1 Windows Application -> installs fine
  • .NET Standard 2.0 Library -> installs fine
  • .NET Framework 4.7.1 Class library -> Could not install package 'Couchbase.Lite.Support.NetDesktop 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

The last one is unexpected, and I cannot get it to happen for me on 4.7 at least (I don’t seem to have 4.7.1. installed). I am in the process of uploading 2.0.0.1 right now though. Internally, someone who was having a similar problem reported that the new version is OK.

2.0.0.1 installs and works for Xamarin iOS and Xamarin Android.

Still busy verifying desktop. Trying to get VS to behave.

So, very strange.

I update Xamarin solution to 2.0.0.1, which includes iOS/Android projects, and .NETStandard project with just the Couchbase.Lite. It runs fine, same as db023. It knows about MutableDocument.

When I update desktop projects (.NET Framework Windows Forms), and also the same shared .NETStandard project to 2.0.0.1 it no longer knows about MutableDocument in the API, and nothing works. It will install without error, but it seems on desktop most of the API is missing.

I created a new Windows Forms application project in VS 2017 (.NET Framework 4.7.1 – tried 4.7 as well), added Couchbase.Lite + support 2.0.0.1 and it has no knowledge of MutableDocument class.

I assume this is not how it should be, but in case the API changed between db023 and GA, why is it still using the old API in VS (Mac) Xamarin then?

I checked the object browser on Couchbase.Lite. When I update db023 to 2.0.0.1 the classes disappear.

That right hand side image looks suspiciously old. My gut reaction says that there is a project on an older version (Conflict was removed a while ago, and the ReadOnly* classes have also been gone since around db022). I double checked the 2.0.0.1 binary and it looks like the left hand side.

EDIT That might have sounded confusing. What I mean is make sure all projects are referencing the same nuget package.

This is a from a single new project where I only added CBL NuGets from nuget.org.

EDIT I deleted all caches etc. I could find. Restarted everything. Now it seems to be back to normal. Oof.