Repository navigation
Description
I updated my Avalonia project to 11.0.4, and trying to add oxyplot to my app. I add the NuGet package, add the Style in App.axaml,
<Application
xmlns="/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AvaloniaGreenhouse"
x:Class="AvaloniaGreenhouse.App">
<Application.Styles>
<SimpleTheme/>
<StyleInclude Source="avares://OxyPlot.Avalonia/Themes/Default.axaml"/>
</Application.Styles>
</Application>
Running the app to make sure it builds and runs, I get the following exception:
Avalonia.Markup.Xaml.XamlLoadException HResult=0x80131500 Message=No precompiled XAML found for avares://OxyPlot.Avalonia/Themes/Default.axaml (baseUri: avares://AvaloniaGreenhouse/App.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource Source=Avalonia.Markup.Xaml StackTrace: at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(IServiceProvider sp, Uri uri, Uri baseUri) at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded() at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) at Avalonia.Styling.Styles.InternalAdd(IList items, IResourceHost owner) at Avalonia.Styling.Styles.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) at Avalonia.Collections.AvaloniaList1.NotifyAdd(T item, Int32 index)
at Avalonia.Collections.AvaloniaList1.Add(T item) at Avalonia.Styling.Styles.Add(IStyle item) at AvaloniaGreenhouse.App.!XamlIlPopulate(IServiceProvider , App ) in C:\Projects\Meadow.Desktop.Samples\Source\Windows\AvaloniaGreenhouse\App.axaml:line 9 at AvaloniaGreenhouse.App.!XamlIlPopulateTrampoline(App ) at AvaloniaGreenhouse.App.Initialize() in C:\Projects\Meadow.Desktop.Samples\Source\Windows\AvaloniaGreenhouse\App.axaml.cs:line 14 at Avalonia.AppBuilder.SetupUnsafe() at Avalonia.AppBuilder.Setup() at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode) at AvaloniaGreenhouse.App.Main(String[] args) in C:\Projects\Meadow.Desktop.Samples\Source\Windows\AvaloniaGreenhouse\App.axaml.cs:line 37
I've compared what I have with your example projects and I have no idea how to solve that exception.
Activity
kekekeks commentedon Sep 9, 2023
It seems that the version on nuget.org is still targeting 0.10.x. Consider using https://github.com/oxyplot/oxyplot-avalonia/ as a submodule for now
jorgedevs commentedon Sep 9, 2023
hm ok, I can downgrade and try the nuget version, I'll report back (and close issue if I get it working). Thanks for the quick reply,
VisualMelon commentedon Sep 9, 2023
There is a 2.1.0-Avalonia11 version on nuget... I'm not sure why it isn't listed on nuget this minute...
VisualMelon commentedon Sep 9, 2023
I will probably release a version 2.1.2 which is Av11 only, because I've not had any feedback suggesting I should do otherwise, but that won't be for a week or so.
jorgedevs commentedon Sep 9, 2023
Release as a beta, maybe? I'd be happy to give it a try. :)
VisualMelon commentedon Sep 10, 2023
Should just need
<PackageReference Include="OxyPlot.Avalonia" Version="2.1.0-Avalonia11" />in your csprojSorry, you meant for 2.1.2: yes, nothing stopping me, but I don't like to rush nuget deployments because I have a history of getting them wrong.
jorgedevs commentedon Sep 11, 2023
Understood, i cant find this 2.1.0-Avalonia11 version.
Im gonna close this issue. I'll use the Avalonia version that's compatible with the oxyplot Nuget version, and figure out the API changes (if any).
Thank you all for the assist.
VisualMelon commentedon Sep 11, 2023
I am very confused. Anyhow, I've pushed 2.1.0-Avalonia11 to nuget just now, so hopefully it will actually work now.
jorgedevs commentedon Sep 11, 2023
Sorry, thought you meant that the package was already out. Anyways, I have made progress with latest stable version, and I can see the plotting canvas on Windows (left), but running it on my Raspberry Pi (right), i dont see it. Do you guys support Linux, by any chance?
VisualMelon commentedon Sep 11, 2023
I did: it's I that was mistaken.... and now very very confused because it means I have no idea how my Linux box was using it.
I use OxyPlot.Avalonia 11 on Linux all the time (somehow); can't recall having tested 0.10 but I have no reason to believe it wouldn't work
jorgedevs commentedon Sep 11, 2023
Ok, then good timing releasing the avalonia 11 preview (Nuget). I'll update my Avalonia back to 11 and try again, hopefully it works.
I'll keep you posted.
VisualMelon commentedon Sep 11, 2023
Sorry for all the confusion (my fault entirely)
jorgedevs commentedon Sep 11, 2023
oh all good, I appreciate your quick responses, I have a deadline for this to work so you're support is welcome so I can keep going.
jorgedevs commentedon Sep 11, 2023
Progress!
I was missing a few more setup things, fortunately was able to figure it out comparing with the samples (which now match the versions I have).
Thanks again. I might open more Issues if I run into any more hiccups. :)
VisualMelon commentedon Sep 11, 2023
If you have vague/throw-away questions, feel free to ask in the gitter: https://app.gitter.im/#/room/#oxyplot_oxyplot:gitter.im