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

UWP install from NuGet #145

Closed
polymorphicshade opened this issue Aug 16, 2021 · 11 comments
Closed

UWP install from NuGet #145

polymorphicshade opened this issue Aug 16, 2021 · 11 comments
Labels
bug Something isn't working has workaround

Comments

@polymorphicshade
Copy link

Browsing https://nuget.info/packages/LiveChartsCore.SkiaSharpView.UWP/2.0.0-beta.40 shows no binaries I can use in my UWP project.

Am I missing something? When I try to use this nuget package in my Visual Studio project, I'm unable to use any LiveChart controls in the XAML and I cannot compile successfully.

@beto-rodriguez
Copy link
Owner

The package is missing the dependency to the core packages, I'll fix in the next release, for now please try to install the core manually.

https://www.nuget.org/packages/LiveChartsCore.SkiaSharpView/2.0.0-beta.40

Or clone this repo and add the reference to your project.

@polymorphicshade
Copy link
Author

polymorphicshade commented Aug 16, 2021

Thanks that seemed to work for now... but the designer is giving me issues (may or may not be related to me referencing the projects manually):

image

Things do show up fine at runtime.

I wasn't able to add LiveChartsCore and LiveChartsCore.SkiaSharpView to my UWP project through the Visual Studio UI, but I had to manually add them in the .csproj file.

@beto-rodriguez
Copy link
Owner

Should be fixed with 1c7f4ec

I will test, then close if it works.

beto-rodriguez added a commit that referenced this issue Aug 18, 2021
@beto-rodriguez beto-rodriguez added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Aug 19, 2021
@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Aug 19, 2021

I made the NuGet package work following the next steps:

  1. Install at least beta.57
  2. Install manually the dependencies (I am not sure why they are not getting installed automatically)

image

  1. Finally when the app starts, in the App.xaml file, at the OnLaunched method, add the following line:

LiveCharts.Configure(config => config.AddDefaultMappers().AddSkiaSharp().AddLightTheme());

This works for now, but this should be improved in a future version.

@beto-rodriguez beto-rodriguez changed the title LiveChartsCore.SkiaSharpView.UWP has no binaries? UWP install from NuGet Aug 19, 2021
@polymorphicshade
Copy link
Author

@beto-rodriguez I tried out the latest beta.60 and everything seems to be working fine so far! 😊 No crashing or designer issues at the moment. Though like you mentioned, I needed to install LiveChartsCore and LiveChartsCore.SkiaSharpView manually.

I didn't need to add that piece of code to App.xaml.cs, but I'll keep that code in mind if I run into any issues.

@humbertomoli99
Copy link

I was using the core of livecharts 1, how crazy to confuse LiveCharts.Core with LiveChartsCore

@rubenseam
Copy link

@beto-rodriguez I'm trying the library on a WinUI3 app, but I'm getting the "missing .xbf file" errors when building the code:
error MSB3030: Could not copy the file "C:\Users\rualvesm.nuget\packages\livechartscore.skiasharpview.winui\2.0.0-beta.70\lib\net5.0-windows10.0.19041\LiveChartsCore.SkiaSharpView.WinUI\DefaultTooltip.xbf" because it was not found.

Any chance you've seen this before?

@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Sep 6, 2021

@rubenseam for WinUI3 please install the WinUI 3 package:

LiveChartsCore.SkiaSharpView.WinUI

WinUI (WinUI3) is so different from WinUI2.

https://docs.microsoft.com/en-us/windows/apps/winui/

@rubenseam
Copy link

Sorry, @beto-rodriguez , I'm not sure which packages I should install. I do have WinUI3 set up for my application.
image
Should I try and install some specific version of LiveCharts/SkiaSharp?

@beto-rodriguez
Copy link
Owner

@rubenseam WinUI3 is not related to UWP.

The packages you installed seem right.

Take a look at the sample that is running on WinUI in this repo:

https://github.com/beto-rodriguez/LiveCharts2/tree/master/samples/WinUISample/WinUI

@beto-rodriguez beto-rodriguez added the bug Something isn't working label Oct 11, 2021
@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Oct 21, 2021

this issue is gone in beta.80 package, for both WinUI and UWP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has workaround
Projects
None yet
Development

No branches or pull requests

4 participants