-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/net8 support #3
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
| var fs = XFontStyleEx.Regular; | ||
| if (fontWeight > FontWeights.Normal) | ||
| { | ||
| fs = XFontStyle.Bold; | ||
| fs = XFontStyleEx.Bold; |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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
|
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. |
No description provided.