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

[Bug] Unable to use Microcharts.Forms 1.0-preview in Xamarin Forms app that uses a .NET Standard 2.0 library #284

Open
mfeingol opened this issue Aug 10, 2021 · 11 comments
Assignees
Labels

Comments

@mfeingol
Copy link

Describe the bug
Unable to use Microcharts.Forms 1.0-preview in .NET Standard 2.0 library

Which platform and version is this for?
Android

To Reproduce
Steps to reproduce the behavior:

  1. Install Microcharts.Forms 1.0-preview in your Xamarin Forms app
  2. Install Microcharts 0.9.5.9 in your .NET Standard 2.0 library
  3. At runtime, observe errors due to breaking changes between these two versions

Expected behavior
I believe we need a 1.0-preview package for Microcharts

@mfeingol mfeingol added the bug label Aug 10, 2021
@eman1986
Copy link
Member

You don't need the Microcharts package, it's not 1.0 compatible. Going forward it's by platform

@mfeingol
Copy link
Author

Interesting. So if I had shared code in a library and used that library on multiple platforms... now I have to either make copies of that code or abstract it away from the Microcharts types.

@eman1986
Copy link
Member

The idea is to keep things specific, I could make a common package if that would be beneficial.

@mfeingol
Copy link
Author

I mean, it's up to you. I can see how you'd aim for the greater simplicity of a package per platform. On the other hand, those of us who support multiple platforms do benefit from having some common types we can use to consolidate code into a single place.

@eman1986
Copy link
Member

I don't want to isolate people who use the library like you do, I know there's a couple other people who do that as well, it's not a major deal to make a shared package and it won't break things for those who do have it setup like that.

@mfeingol
Copy link
Author

@eman1986: just to check in on this, do you plan to update the preview with a shared package, or will things remain as they are?

Thanks.

@eman1986
Copy link
Member

Yes I do, been a little busy lately but I am planning on releasing another preview version soon.

@eman1986 eman1986 self-assigned this Nov 12, 2021
@Haukinger
Copy link

Side note: when using microcharts newer than 0.8.4.1-pre, one cannot test with xamarin forms mocks anymore (because skia dropped the net framework assembly with 1.68.0). See this issue

This is, of course, no problem on a real device or in the simulator, but if you want to test headless with spec flow, for example, this is a show stopper.

@eman1986
Copy link
Member

If skia dropped it, then there's nothing I can do. I'm not going to downgrade a dependency over a failure to unit test.

You might be better off making a ticket with the skia team.

@ebussa
Copy link

ebussa commented Mar 4, 2022

I am using Microcharts with QuestPDF in a WPF application. So, I settled on using the new Microcharts.Forms 1.0-preview package. However, when I installed the latest Visual Studio update, I ran into Xaml Compiler errors because Microcharts.Forms package references Xamarin.Forms. Apparently, with this update, it is no longer possible for a WPF project to reference Xamarin.Forms unless you set EnableDefaultXamlItems to false in the project file (see dotnet/wpf#6153).

I've reverted to the previous version's common package and is working for now. I wonder if there might be value in creating a Microcharts.Core package that doesn't have any "viewers"? I think that could be a good fit for integration with QuestPDF and other scenarios?

@microcharts-dotnet microcharts-dotnet locked and limited conversation to collaborators Mar 4, 2022
@eman1986
Copy link
Member

eman1986 commented Mar 4, 2022

I believe I took out wof support because it's an older framework of Microsoft and they have the uwp platform now, also I was trying to focus on the xamarin platform more than anything as that's our core demographic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants