Skip to content

Conversation

@lafleurh
Copy link

@lafleurh lafleurh commented Oct 1, 2025

No description provided.

@lafleurh lafleurh requested review from Copilot and pvenky October 1, 2025 21:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds .NET 8 support to the OxyPlot library by creating new project files with ".core" suffixes that target .NET 8/net8.0-windows while maintaining compatibility with existing functionality. The changes focus on modernizing the project structure and updating test frameworks.

  • Converts multiple projects from legacy .NET Framework to .NET 8 SDK-style project files
  • Updates NUnit test framework from version 2.x to 4.x with corresponding syntax changes
  • Adds missing interface method implementations and fixes minor compatibility issues

Reviewed Changes

Copilot reviewed 52 out of 58 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Source/OxyPlot/OxyPlot.core.csproj New .NET Standard 2.0 project file for core OxyPlot library
Source/OxyPlot.core.sln New solution file containing all .NET 8 core projects
Source/OxyPlot.Wpf/OxyPlot.Wpf.core.csproj New net8.0-windows project file for WPF components
Source/OxyPlot.Tests/OxyPlot.Tests.core.csproj New test project targeting net8.0-windows with NUnit 4.x
Multiple test files Updated NUnit assertions from Assert to ClassicAssert/modern syntax
Source/OxyPlot.Pdf/PdfRenderContext.cs Fixed deprecated XFontStyle usage
Source/OxyPlot/Imaging/Jpeg/JpegDecoder.cs Added missing interface method implementation
Files not reviewed (6)
  • Source/Examples/WPF/ExampleBrowser/Properties/Resources.Designer.cs: Language not supported
  • Source/Examples/WPF/ExampleBrowser/Properties/Settings.Designer.cs: Language not supported
  • Source/Examples/WPF/WpfExamples/Properties/Resources.Designer.cs: Language not supported
  • Source/Examples/WPF/WpfExamples/Properties/Settings.Designer.cs: Language not supported
  • Source/OxyPlot.Wpf/Properties/Resources.Designer.cs: Language not supported
  • Source/OxyPlot.Wpf/Properties/Settings.Designer.cs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +254 to +257
var fs = XFontStyleEx.Regular;
if (fontWeight > FontWeights.Normal)
{
fs = XFontStyle.Bold;
fs = XFontStyleEx.Bold;
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from XFontStyle to XFontStyleEx suggests an API migration. Ensure this is the correct replacement and that XFontStyleEx provides equivalent functionality to the original XFontStyle enum.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to upgrade the older projects to use the new NuGet packages

// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bring this back and use a compile conditional to exclude for .NET core

// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bring this back and use a compile conditional to exclude for .NET core

plot.Axes.Add(new LinearAxis { AbsoluteMaximum = 0, AbsoluteMinimum = 0 });
((IPlotModel)plot).Update(true);
Assert.IsNotNull(plot.GetLastUpdateException() as InvalidOperationException);
Assert.That(plot.GetLastUpdateException() as InvalidOperationException, Is.Not.Null);
Copy link
Author

@lafleurh lafleurh Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to upgrade .NET 4 project to latest NUnit NuGet


// http://www.nunit.org/index.php?p=requiresSTA&r=2.5
[assembly: RequiresSTA]
[assembly: Apartment(System.Threading.ApartmentState.STA)]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to upgrade to latest NUnit NuGet

@lafleurh
Copy link
Author

lafleurh commented Oct 1, 2025

The old build won't work anymore. This will build a .NET 8 version. I ran the examples and they work. The code unit tests are failing for images that are generated. I only observed one bug in the images, but not all of them match pixel for pixes.

I have a .NET 8 NuGet package I can use for flotools now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants