Microcharts icon indicating copy to clipboard operation
Microcharts copied to clipboard

[Bug]Getting Target error when Targeting Maui App to .net 7.0

Open Rishi2611 opened this issue 1 year ago • 5 comments

I am targeting maui app to .net 7.0 and getting error micro charts not supported on .net 7.0 Code:- <TargetFrameworks>net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>

I am using this because I have added Unit Test Project respective to this project and have added reference of the the main project in unit test project, when i am running unit test app I am getting error micro charts not supported on .net 7.0

Rishi2611 avatar Mar 22 '24 07:03 Rishi2611

Same here. Following this

ISSPRO-Eng avatar Apr 02 '24 17:04 ISSPRO-Eng

Same with .Net 8

albanfavresysmed avatar Apr 12 '24 10:04 albanfavresysmed

Yeah, even when I exclusively say not for .net 8, I can't get it to recognize Microcharts:

 <ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
   <PackageReference Include="Microcharts.Maui" Version="1.0.0" />
 </ItemGroup>

Severity Code Description Project File Line Suppression State Priority Details Error (active) CS1061 'MauiAppBuilder' does not contain a definition for 'UseMicrocharts' and no accessible extension method 'UseMicrocharts' accepting a first argument of type 'MauiAppBuilder' could be found (are you missing a using directive or an assembly reference?) BeachBallApp (net8.0), BeachBallApp (net8.0-android34.0), BeachBallApp (net8.0-ios) D:\AppsMaui\BeachBallProperties\BeachBallApp\MauiProgram.cs 71 Normal

BillyMartin1964 avatar Sep 29 '24 14:09 BillyMartin1964

Facing the similar issue, it has something to do Microcharts.Maui is not compatible with .Net 7/8, but rather its compatible with .Net7/8 Android, Windows, IOS.
Also mentioned in the Compatibility Sections Built in views are provided for: UWP Xamarin.Forms, Xamarin.iOS and Xamarin.Android, Xamarin.macOS .NET MAUI (Windows, Android, iOS, and macOS) WinUI (Windows App SDK) And any other .NET Standard 2.0 SkiaSharp supported platform is also compatible (see one of the included ChartView implementations for more details). Will have to see if there is way-out to fix it.

rajput400 avatar Oct 01 '24 03:10 rajput400

Are you using it off NuGet or building from source? I see that the version published on NuGet in Aug 2023, is only compatible with net6.0-ios and net6.0-android (and hence, iOS and Android versions of .NET 7.0 and 8.0).

The repo contains newer code where net7.0;net7.0-ios;net7.0-android are the target frameworks, but this code is not published to NuGet.

follesoe avatar Oct 16 '24 13:10 follesoe