Skip to content

Commit f1b3d44

Browse files
authored
Improve Project Files (#1937)
* Add Directory.Build.props to Solution Items folders so it's more visible in Visual Studio. * Add EnableWindowsTargeting to enable building .NET Framework libs on Linux and Mac * Pull out common project properties to Directory.Build.props * OxyPlot.SkiaSharp: fix use of deprecated functions * Update Changelog * Remove ReferenceAssemblies nuget as it's included by DotNet.ReproducibleBuilds * Update target frameworks .NET Framework versions updated to 4.6.2 as 4.5.2 is EOL. .NET Standard versions before 2.0 are no longer supported as .NET Framework 4.6.2 supports .NET Standard 2.0. Examples moved to .NET 6.0. .NET Core 3.1 support removed as it is EOL on December 13, 2022. Tests changed to run on .NET Framework and .NET 6.0. Project SDKs updated to new Microsoft.NET.Sdk. Fix nullable errors from updating to .NET 6.0. * Update GitHub Actions .NET versions * Remove .NET 6 builds for OxyPlot.Pdf The underlying library is .NET Framework only, and it's deprecated. It has a bug on .NET 6 related to code pages. * Fix test discovery on .NET 6.0 * Change some tests to use TestCaseSource * Update changelog * Update AppVeyor image version Hopefully this has .NET 6.0 * Enable net462 for example projects May as well, since we need to build ExampleLibrary for net462 for the tests anyway. * Fix rebase fallout * Fix XpsExporter on .NET Framework * ExampleLibrary: remove net6.0-windows target * Address review feedback - Update github actions versions - Add .NET 7.0 targets - Don't overwrite NoWarn * Improve Directory.Build.targets * Move nullability error suppression to use site
1 parent 952d5c3 commit f1b3d44

51 files changed

Lines changed: 240 additions & 336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v3
3333

3434
- name: Setup .NET Core
35-
uses: actions/setup-dotnet@v1
35+
uses: actions/setup-dotnet@v3
3636
with:
3737
dotnet-version: |
3838
3.1.x

.github/workflows/dotnetcore.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
build:
1313
runs-on: windows-latest
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v3
1616

17-
- name: Setup .NET Core
18-
uses: actions/setup-dotnet@v1
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v3
1919
with:
2020
dotnet-version: |
21-
3.1.x
2221
6.0.x
22+
7.0.x
2323
2424
- name: Build
2525
run: dotnet build Source/OxyPlot.CI.sln --configuration Release

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ All notable changes to this project will be documented in this file.
1212

1313
### Changed
1414
- Make consistent BaseValue and BaseLine across BarSeries, LinearBarSeries, and HistogramSeries
15+
- Factor out common project properties to `Directory.Build.props` (#1937)
16+
- Remove support for .NET Standard 1.X, as .NET Framework 4.6.2 supports .NET Standard 2.0 (#1937)
17+
- Remove support for .NET Core 3.1, as it is end-of-life soon (#1937)
18+
- Move example projects to .NET Framework 4.6.2 and .NET 6.0 (#1937)
19+
- Run tests on both .NET Framework 4.6.2 and .NET 6.0 (#1937)
20+
- Add support for .NET 7.0 (#1937)
1521

1622
### Removed
1723
- Support for .NET Framework 4.0 and 4.5 (#1839)
@@ -23,6 +29,7 @@ All notable changes to this project will be documented in this file.
2329
- Incorrect coloring of TwoColorLineSeries
2430
- HitTest when IsLegendVisible is false (#1975)
2531
- Font weight not being applied in ImageSharp (#2006)
32+
- SkiaSharp - Fix use of obsolete functions (#1937)
2633

2734
## [2.1.2] - 2022-12-03
2835

Source/Directory.Build.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<Sdk Name="DotNet.ReproducibleBuilds.Isolated" Version="1.1.1" />
33
<ItemGroup>
44
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" PrivateAssets="All"/>
5-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
65
</ItemGroup>
6+
<PropertyGroup>
7+
<Copyright>Copyright (c) 2014-2022 OxyPlot Contributors</Copyright>
8+
<RepositoryType>git</RepositoryType>
9+
<RepositoryUrl>https://github.com/oxyplot/oxyplot.git</RepositoryUrl>
10+
<EnableWindowsTargeting>true</EnableWindowsTargeting>
11+
</PropertyGroup>
712
</Project>

Source/Directory.Build.targets

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
<ItemGroup Condition="$(GeneratePackageOnBuild)">
3+
<None Include="$(MSBuildThisFileDirectory)../Icons/OxyPlot_128.png" Pack="true" PackagePath="\" Visible="false" />
4+
<None Include="$(MSBuildThisFileDirectory)../README.md" Pack="true" PackagePath="\" Visible="false" />
5+
</ItemGroup>
6+
<PropertyGroup Condition="$(GeneratePackageOnBuild)">
7+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
8+
<PackageProjectUrl>https://oxyplot.github.io/</PackageProjectUrl>
9+
<PackageIcon>OxyPlot_128.png</PackageIcon>
10+
<PackageReadmeFile>README.md</PackageReadmeFile>
11+
</PropertyGroup>
12+
</Project>

Source/Examples/Core.Drawing/Example1/Example1.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
<TargetFrameworks>net6.0</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

Source/Examples/ExampleGenerator/ExampleGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
55
<!--<UseWindowsForms>true</UseWindowsForms>-->
66
<OutputType>Exe</OutputType>
77
<ApplicationIcon />

Source/Examples/ExampleLibrary/ExampleLibrary.csproj

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.0;netstandard2.0;net462</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net462;net6.0;net7.0</TargetFrameworks>
54
<PackageId>OxyPlot.ExampleLibrary</PackageId>
6-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
5+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
76
<Description>Example models for OxyPlot.</Description>
8-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
9-
<Copyright>OxyPlot contributors</Copyright>
10-
<PackageProjectUrl>https://oxyplot.github.io/</PackageProjectUrl>
11-
<PackageIcon>OxyPlot_128.png</PackageIcon>
127
<PackageTags>plotting plot charting chart</PackageTags>
13-
<RepositoryType>git</RepositoryType>
14-
<RepositoryUrl>https://github.com/oxyplot/oxyplot.git</RepositoryUrl>
158
</PropertyGroup>
16-
179
<ItemGroup>
1810
<None Remove="Resources\DodgyContourData.tsv" />
1911
<None Remove="Resources\X.txt" />
2012
<None Remove="Resources\Y.txt" />
2113
</ItemGroup>
22-
<ItemGroup>
23-
<None Include="..\..\..\Icons\OxyPlot_128.png" Pack="true" PackagePath="\" />
24-
</ItemGroup>
2514
<ItemGroup>
2615
<EmbeddedResource Include="Resources\Bergensbanen.csv" />
2716
<EmbeddedResource Include="Resources\DodgyContourData.tsv" />

Source/Examples/ImageSharp/Example1/Example1.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
<TargetFrameworks>net6.0</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

Source/Examples/PerformanceTest/PerformanceTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net462</TargetFramework>
3+
<TargetFrameworks>net462;net6.0-windows;net7.0-windows</TargetFrameworks>
44
<OutputType>Exe</OutputType>
55
<ApplicationIcon />
66
<StartupObject />

0 commit comments

Comments
 (0)