Pre loader

SciChart into Xamarin Cross platform

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi

I’m trying to use SciChart in my Xamarin Visual Studio Cross platform application. After installing the SciChart package in the Package Manager console I got the dependency reference error:

Package SciChart 5.1.0.11405 was restored using '.NETFramework, Version=v4.6.1' instead of the project target framework 'NETStandard,Version=v2.0'. This papckage may not be fully compatible with your project .

I know that .NET framework 4.6.1 is different from .NETStandard2.0.

I’ve read some articles about how to target multiple .NET versions in the same application by modifying the .csproj file, but I can’t get it work anyway.
https://medium.com/@SicknoteSteve/nuget-targeting-both-net-standard-and-the-net-framework-326a16266ca4
I’ve modified the csproj file like this

<PropertyGroup>
  <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
  <PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
  <PackageReference Include="SciChart" Version="5.1.0.11405" />
  <PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>

This action removes all dependency errors, but I still can’t use the libraries.

Does anyone know how to solve this issue?

Thanks in advance!

Version
5.1.0.11405
  • You must to post comments
0
0

Hi Jonas

At the moment SciChart iOS/Android only supports Xamarin Native, meaning it can be used in Xamarin.iOS and Xamarin.Android projects. It has not been built to support Xamarin.Forms out of the box.

It is possible however to use SciChart in Xamarin Forms, however you will need to write a custom renderer for the chart control for the ios + android platforms.

Some info here:
https://blog.xamarin.com/embedding-native-controls-into-xamarin-forms/
https://www.grapecity.com/en/blogs/using-a-custom-native-control-with-xamarin-forms-via-a-custom-renderer/

Finally please note that our windows charts are not built for UWP so the windows side of Xamarin is missing.

This may be something we support in the future, but right now we are not working on it.

Best regards,
Andrew

  • You must to post comments
0
0

Hi everyone

If you wish to see SciChart in Xamarin Forms, please vote for it on our features request system.

enter image description here

To access, please see here: https://www.scichart.com/feedback-policy/

Best regards,
Andrew

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.