Skip to content

Commit 7c48175

Browse files
committed
Upgrades to .NET 10
Updates global SDK to 10.0.100, sets C# language version to 14.0, adds or updates target frameworks to net10.0-windows for library and test projects, and configures the CI workflow for .NET 10.x.
1 parent 20414e4 commit 7c48175

File tree

12 files changed

+70
-69
lines changed

12 files changed

+70
-69
lines changed
Lines changed: 59 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,74 @@
11
name: Build Artifacts
22

33
on:
4-
workflow_call:
5-
inputs:
6-
build-configuration:
7-
default: "Release"
8-
required: false
9-
type: string
10-
mdix-version:
11-
required: true
12-
type: string
13-
mdix-colors-version:
14-
required: true
15-
type: string
16-
mdix-mahapps-version:
17-
required: true
18-
type: string
4+
workflow_call:
5+
inputs:
6+
build-configuration:
7+
default: "Release"
8+
required: false
9+
type: string
10+
mdix-version:
11+
required: true
12+
type: string
13+
mdix-colors-version:
14+
required: true
15+
type: string
16+
mdix-mahapps-version:
17+
required: true
18+
type: string
1919

2020
jobs:
21-
build:
22-
name: Build and Test
23-
runs-on: windows-latest
21+
build:
22+
name: Build and Test
23+
runs-on: windows-latest
2424

25-
env:
26-
solution: MaterialDesignToolkit.Full.sln
25+
env:
26+
solution: MaterialDesignToolkit.Full.sln
2727

28-
steps:
29-
- uses: actions/checkout@v5
28+
steps:
29+
- uses: actions/checkout@v5
3030

31-
- name: Setup .NET
32-
uses: actions/setup-dotnet@v5
33-
with:
34-
dotnet-version: |
35-
8.x
36-
9.x
31+
- name: Setup .NET
32+
uses: actions/setup-dotnet@v5
33+
with:
34+
dotnet-version: |
35+
8.x
36+
9.x
37+
10.x
3738
38-
- name: Restore dependencies
39-
run: dotnet restore ${{ env.solution }}
39+
- name: Restore dependencies
40+
run: dotnet restore ${{ env.solution }}
4041

41-
- name: Build
42-
run: dotnet build ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True
43-
env:
44-
MDIXVersion: ${{ inputs.mdix-version }}
45-
MDIXColorsVersion: ${{ inputs.mdix-colors-version }}
46-
MDIXMahAppsVersion: ${{ inputs.mdix-mahapps-version }}
42+
- name: Build
43+
run: dotnet build ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True
44+
env:
45+
MDIXVersion: ${{ inputs.mdix-version }}
46+
MDIXColorsVersion: ${{ inputs.mdix-colors-version }}
47+
MDIXMahAppsVersion: ${{ inputs.mdix-mahapps-version }}
4748

48-
- name: Test
49-
timeout-minutes: 20
50-
run: dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions
49+
- name: Test
50+
timeout-minutes: 20
51+
run: dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions
5152

52-
- name: Upload Screenshots
53-
if: ${{ always() }}
54-
uses: actions/upload-artifact@v5
55-
with:
56-
name: Screenshots-${{ github.run_number }}
57-
path: ${{ github.workspace }}\tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net9.0-windows\Screenshots
58-
if-no-files-found: ignore
53+
- name: Upload Screenshots
54+
if: ${{ always() }}
55+
uses: actions/upload-artifact@v5
56+
with:
57+
name: Screenshots-${{ github.run_number }}
58+
path: ${{ github.workspace }}\tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net9.0-windows\Screenshots
59+
if-no-files-found: ignore
5960

60-
- name: Build NuGets
61-
run: .\build\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdix-version }} -MDIXColorsVersion ${{ inputs.mdix-colors-version }} -MDIXMahAppsVersion ${{ inputs.mdix-mahapps-version }}
61+
- name: Build NuGets
62+
run: .\build\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdix-version }} -MDIXColorsVersion ${{ inputs.mdix-colors-version }} -MDIXMahAppsVersion ${{ inputs.mdix-mahapps-version }}
6263

63-
- name: Upload NuGets
64-
uses: actions/upload-artifact@v5
65-
with:
66-
name: NuGets
67-
path: "*.nupkg"
64+
- name: Upload NuGets
65+
uses: actions/upload-artifact@v5
66+
with:
67+
name: NuGets
68+
path: "*.nupkg"
6869

69-
- name: Upload Demo App
70-
uses: actions/upload-artifact@v5
71-
with:
72-
name: DemoApp
73-
path: "src/MainDemo.Wpf/bin/${{ env.buildConfiguration }}"
70+
- name: Upload Demo App
71+
uses: actions/upload-artifact@v5
72+
with:
73+
name: DemoApp
74+
path: "src/MainDemo.Wpf/bin/${{ env.buildConfiguration }}"

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Copyright>Copyright © 2022</Copyright>
44
<Company>Mulholland Software/James Willock</Company>
55

6-
<LangVersion>13.0</LangVersion>
6+
<LangVersion>14.0</LangVersion>
77
<ErrorReport>prompt</ErrorReport>
88

99
<SignAssembly>true</SignAssembly>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.306",
3+
"version": "10.0.100",
44
"rollForward": "latestMinor"
55
}
66
}

src/MaterialDesign3.MaterialColorUtilities/MaterialColorUtilities.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<RootNamespace>MaterialColorUtilities</RootNamespace>
44
<AssemblyName>MaterialColorUtilities</AssemblyName>
5-
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
5+
<TargetFrameworks>net462;net8.0-windows;net10.0-windows</TargetFrameworks>
66
<LangVersion>13</LangVersion>
77
<ImplicitUsings>disable</ImplicitUsings>
88
<RootNamespace>MaterialColorUtilities</RootNamespace>

src/MaterialDesignColors.Wpf/MaterialDesignColors.Wpf.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<RootNamespace>MaterialDesignColors</RootNamespace>
44
<AssemblyName>MaterialDesignColors</AssemblyName>
5-
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
5+
<TargetFrameworks>net462;net8.0-windows;net10.0-windows</TargetFrameworks>
66
<UseWPF>true</UseWPF>
77
<MDIXColorsVersion Condition="$(MDIXColorsVersion) == '' Or $(MDIXColorsVersion) == '*Undefined*'">1.0.1</MDIXColorsVersion>
88
<MDIXColorsVersion>$([System.Text.RegularExpressions.Regex]::Replace("$(MDIXColorsVersion)", "-ci\d+$", ""))</MDIXColorsVersion>

src/MaterialDesignThemes.MahApps/MaterialDesignThemes.MahApps.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
4+
<TargetFrameworks>net462;net8.0-windows;net10.0-windows</TargetFrameworks>
55
<UseWPF>true</UseWPF>
66
<MDIXMahAppsVersion Condition="$(MDIXMahAppsVersion) == '' Or $(MDIXMahAppsVersion) == '*Undefined*'">1.0.1</MDIXMahAppsVersion>
77
<MDIXMahAppsVersion>$([System.Text.RegularExpressions.Regex]::Replace("$(MDIXMahAppsVersion)", "-ci\d+$", ""))</MDIXMahAppsVersion>

src/MaterialDesignThemes.Wpf/MaterialDesignThemes.Wpf.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
33
<PropertyGroup>
4-
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
4+
<TargetFrameworks>net462;net8.0-windows;net10.0-windows</TargetFrameworks>
55
<UseWPF>true</UseWPF>
66
<MDIXVersion Condition="$(MDIXVersion) == '' Or $(MDIXVersion) == '*Undefined*'">1.0.1</MDIXVersion>
77
<MDIXVersion>$([System.Text.RegularExpressions.Regex]::Replace("$(MDIXVersion)", "-ci\d+$", ""))</MDIXVersion>

src/MaterialDesignToolkit.ResourceGeneration/MaterialDesignToolkit.ResourceGeneration.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
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net8.0-windows</TargetFramework>
4+
<TargetFramework>net10.0-windows</TargetFramework>
55
<UseWPF>true</UseWPF>
66
</PropertyGroup>
77
<ItemGroup>

tests/MaterialColorUtilities.Tests/MaterialColorUtilities.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFramework>net8.0-windows</TargetFramework>
4+
<TargetFrameworks>net8.0-windows;net10.0-windows</TargetFrameworks>
55
<AssemblyTitle>MaterialColorUtilities.Tests</AssemblyTitle>
66
<Product>MaterialColorUtilities.Tests</Product>
77
<OutputType>Exe</OutputType>

tests/MaterialDesignColors.Wpf.Tests/MaterialDesignColors.Wpf.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net472;net8.0-windows</TargetFrameworks>
4+
<TargetFrameworks>net472;net8.0-windows;net10.0-windows</TargetFrameworks>
55
<AssemblyTitle>MaterialDesignColors.Wpf.Tests</AssemblyTitle>
66
<Product>MaterialDesignColors.Wpf.Tests</Product>
77
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>

0 commit comments

Comments
 (0)