watson-developer-cloud / dotnet-standard-sdk

:new::new::new:.NET Standard library to access Watson Services.
https://www.nuget.org/profiles/ibm-watson
Apache License 2.0
147 stars 117 forks source link

Add Xamarin support #91

Closed Daiki-Kawanuma closed 7 years ago

Daiki-Kawanuma commented 7 years ago

This SDK cannot be used on Xamarin projects due to "Microsoft.AspNet.WebApi.Client" package.

Package Microsoft.AspNet.WebApi.Client 5.2.3 is not compatible with netstandard1.6 (.NETStandard,Version=v1.6). Package Microsoft.AspNet.WebApi.Client 5.2.3 supports: - net45 (.NETFramework,Version=v4.5) - portable-net45+netcore45+wp8+wp81+wpa81

As described above, Microsoft.AspNet.WebApi.Client doesn't support MonoAndroid+MonoTouch+Xamarin.ios10.

Is it possible to support Xamarin?

mediumTaj commented 7 years ago

@atilatosta Have you tested this?

Daiki-Kawanuma commented 7 years ago

Sorry for the late reply.

I tried to add this SDK package to Xamarin .NET Standard PCL project but it failed. The following is NuGet package install error.

Restoring packages for 'WatsonSample'. Restoring packages for /Users/DaikiKawanuma/Projects/WatsonSample/WatsonSample/project.json... Restoring packages for .NETStandard,Version=v1.6.2... Resolving conflicts for .NETStandard,Version=v1.6.2... Checking compatibility of packages on .NETStandard,Version=v1.6.2. Checking compatibility for WatsonSample 1.0.0 with .NETStandard,Version=v1.6.2. Checking compatibility for IBM.WatsonDeveloperCloud.Conversation 0.1.1-alpha with .NETStandard,Version=v1.6.2. Checking compatibility for Microsoft.NETCore.Portable.Compatibility 1.0.1 with .NETStandard,Version=v1.6.2. Checking compatibility for NETStandard.Library 1.6.0 with .NETStandard,Version=v1.6.2. Checking compatibility for System.ComponentModel 4.3.0 with .NETStandard,Version=v1.6.2. Checking compatibility for System.Runtime.Serialization.Json 4.3.0 with .NETStandard,Version=v1.6.2. Checking compatibility for Xam.Plugins.Forms.RoundedBoxView 1.0.0.7 with .NETStandard,Version=v1.6.2. Checking compatibility for Xamarin.Forms 2.3.4.231 with .NETStandard,Version=v1.6.2. Checking compatibility for System.Runtime.Serialization.Xml 4.1.1 with .NETStandard,Version=v1.6.2. Checking compatibility for IBM.WatsonDeveloperCloud 0.1.1-alpha with .NETStandard,Version=v1.6.2. Checking compatibility for Microsoft.AspNet.WebApi.Client 5.2.3 with .NETStandard,Version=v1.6.2. Package Microsoft.AspNet.WebApi.Client 5.2.3 is not compatible with netstandard1.6.2 (.NETStandard,Version=v1.6.2). Package Microsoft.AspNet.WebApi.Client 5.2.3 supports:

And project.json here.

{ "supports": {}, "dependencies": { "IBM.WatsonDeveloperCloud.Conversation": "0.1.1-alpha", "Microsoft.NETCore.Portable.Compatibility": "1.0.1", "NETStandard.Library": "1.6", "System.ComponentModel": "4.3.0", "System.Runtime.Serialization.Json": "4.3.0", "Xam.Plugins.Forms.RoundedBoxView": "1.0.0.7", "Xamarin.Forms": "2.3.4.231" }, "frameworks": { "netstandard1.6.2": { "imports": "portable-net46+monoandroid10+xamarinios10+" } } }

atilatosta commented 7 years ago

@Daiki-Kawanuma hi! We believe that support is possible. We're working on it.

@mediumTaj We are doing some implementations and testing to try to make this possible

jefftmahoney commented 7 years ago

I would really love to see Xamarin supported. I'm running it on a Mac and have tried targeting my solution to every .NET framework version in the list, and no luck. The error I get makes it sound like the problem is the framework version I'm targeting, but the thread above seems to indicate deeper problems. Anyway, would love to have this if you can make it happen!