Conversation
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
Need to upgrade the older projects to use the new NuGet packages
| @@ -5,6 +5,3 @@ | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
|
|
|||
| using System.Reflection; | |||
There was a problem hiding this comment.
Need to bring this back and use a compile conditional to exclude for .NET core
| @@ -5,6 +5,3 @@ | |||
| // -------------------------------------------------------------------------------------------------------------------- | |||
|
|
|||
| using System.Reflection; | |||
There was a problem hiding this comment.
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.
Need to upgrade .NET 4 project to latest NUnit NuGet
|
|
||
| // http://www.nunit.org/index.php?p=requiresSTA&r=2.5 | ||
| [assembly: RequiresSTA] No newline at end of file | ||
| [assembly: Apartment(System.Threading.ApartmentState.STA)] |
There was a problem hiding this comment.
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. |
…minutes. Update baseline images for tests with .NET Core 8. Update build pipeline.
No description provided.