Repository navigation
Closed
Labels
bugSomething isn't working
Description
Description
When using scottplot in verso, it throws The version of the native libSkiaSharp library (80.2) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [119.0, 120.0).
(This doesn't happen in c# console projects)
Steps to Reproduce
#r "nuget:ScottPlot, 5.1.59"// create sample data
double[] dataX = new double[] { 1, 2, 3, 4, 5 };
double[] dataY = new double[] { 1, 4, 9, 16, 25 };
// plot the data
ScottPlot.Plot plt = new();
plt.Add.Scatter(dataX, dataY);
// display the plot
plt.SavePng("example.png", 400, 300);Error Output
TypeInitializationException
System.TypeInitializationException: The type initializer for 'ScottPlot.Fonts' threw an exception.
---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKTypeface' threw an exception.
---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
---> System.InvalidOperationException: The version of the native libSkiaSharp library (80.2) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [119.0, 120.0).
at ScottPlot.Fonts.get_DefaultFontStyle()
at ScottPlot.LabelStyle..ctor()
at ScottPlot.Plottables.Benchmark..ctor()
at ScottPlot.Plot..ctor()
at Submission#3.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
at Verso.Kernels.ScriptStateManager.RunAsync(String code, Object globals, CancellationToken cancellationToken) in /home/runner/work/Verso/Verso/src/Verso/Kernels/ScriptStateManager.cs:line 39
at Verso.Kernels.CSharpKernel.ExecuteAsync(String code, IExecutionContext context) in /home/runner/work/Verso/Verso/src/Verso/Kernels/CSharpKernel.cs:line 225
Component
C# Kernel
Frontend
VS Code
Verso Version
1.1.2
.NET Version
10.0.9
Operating System
Windows 11
Notebook Snippet
Loaded Extensions
No response
Severity
High - blocks a workflow, no reasonable workaround
Checklist
- I searched existing issues and this hasn't been reported yet
- I can reproduce this with no third-party extensions loaded
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
TorreyBetts commentedon Jul 30, 2026
Hi, thanks for using Verso. You can use ScottPlot like this:
If you're wanting to use their latest version it appears their API changed from the snippet I used above. Now it would look like this:
Cell 1 (show a chart):
Cell 2 (save an image):
I'll close this issue, if you have any further questions about ScottPlot, reply here.
oxygen-dioxide commentedon Aug 2, 2026
Your method doesn't work on my end. I'm still getting the same
The version of the native libSkiaSharp library (80.2) is incompatible with this version of SkiaSharp.error with your code, on both .NET 8.0.28 and .NET 10.0.9, and both ScottPlot 5.0.36 and ScottPlot 5.1.59TorreyBetts commentedon Aug 2, 2026
Since I wasn't able to reproduce on my own, I fed it to AI and it was able to reproduce the scenario you experienced by starting with 5.0.36 and then later switching to 5.1.59. A fix has been committed and will be included in the next release.
oxygen-dioxide commentedon Aug 5, 2026
I found out why I can't use scottplot: I have Akorin in my PATH, who has libSkiaSharp 80.2
oxygen-dioxide commentedon Aug 5, 2026
Use lock-free arrays and add package native resolver