Skip to content

Commit 37a4c07

Browse files
Upgrade to .NET 9.0 across configurations and Dockerfiles
This commit updates the .NET version from 8.0 to 9.0 in multiple YAML configuration files, including `buildwindowsimage.yml`, `createrelease.yml`, `nightlybuild.yml`, `pullrequest.yml`, and `pushtomaster.yml`. The Dockerfiles have also been modified to use the .NET 9.0 SDK images. Additionally, the `MobileConfiguration.csproj` file has been updated to target .NET 9.0, with package references updated to their respective 9.0 versions for compatibility.
1 parent a6e3e81 commit 37a4c07

8 files changed

Lines changed: 33 additions & 28 deletions

File tree

.github/workflows/buildwindowsimage.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2.3.4
17+
18+
- name: Install NET 9
19+
uses: actions/setup-dotnet@v4.0.1
20+
with:
21+
dotnet-version: '9.0.x'
1722

1823
- name: Get the version
1924
id: get_version

.github/workflows/createrelease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
id: get_version
2020
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
2121

22-
- name: Install NET 8
23-
uses: actions/setup-dotnet@v2
22+
- name: Install NET 9
23+
uses: actions/setup-dotnet@v4.0.1
2424
with:
25-
dotnet-version: '8.0.x'
25+
dotnet-version: '9.0.x'
2626

2727
- name: Restore Nuget Packages
2828
run: dotnet restore MobileConfiguration.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

.github/workflows/nightlybuild.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
- name: Set Up Variables
2020
run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
2121

22-
- name: Install NET 8
23-
uses: actions/setup-dotnet@v2
22+
- name: Install NET 9
23+
uses: actions/setup-dotnet@v4.0.1
2424
with:
25-
dotnet-version: '8.0.x'
25+
dotnet-version: '9.0.x'
2626

2727
- name: Restore Nuget Packages
2828
run: dotnet restore MobileConfiguration.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

.github/workflows/pullrequest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2.3.4
1818

19-
- name: Install NET 8
20-
uses: actions/setup-dotnet@v2
19+
- name: Install NET 9
20+
uses: actions/setup-dotnet@v4.0.1
2121
with:
22-
dotnet-version: '8.0.x'
22+
dotnet-version: '9.0.x'
2323

2424
- name: Restore Nuget Packages
2525
run: dotnet restore MobileConfiguration.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

.github/workflows/pushtomaster.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22-
- name: Install NET 8
23-
uses: actions/setup-dotnet@v2
22+
- name: Install NET 9
23+
uses: actions/setup-dotnet@v4.0.1
2424
with:
25-
dotnet-version: '8.0.x'
25+
dotnet-version: '9.0.x'
2626

2727
- name: Restore Nuget Packages
2828
run: dotnet restore MobileConfiguration.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}

MobileConfiguration/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM stuartferguson/txnprocbase AS base
22
WORKDIR /app
33

4-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
4+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
55
WORKDIR /src
66
COPY ["MobileConfiguration/NuGet.Config", "MobileConfiguration/"]
77
COPY ["MobileConfiguration/MobileConfiguration.csproj", "MobileConfiguration/"]

MobileConfiguration/Dockerfilewindows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM stuartferguson/txnprocbasewindows AS base
22
USER ContainerAdministrator
33
WORKDIR /app
44

5-
FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 AS build
5+
FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-ltsc2022 AS build
66
WORKDIR /src
77
COPY ["MobileConfiguration/NuGet.Config", "MobileConfiguration/"]
88
COPY ["MobileConfiguration/MobileConfiguration.csproj", "MobileConfiguration/"]

MobileConfiguration/MobileConfiguration.csproj

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<UserSecretsId>8795d0e9-2509-41b8-b1e1-f28f8468338b</UserSecretsId>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.3" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
13-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.3">
11+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.5" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.5" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.5">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17-
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
18-
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.8" />
19-
<PackageReference Include="Shared" Version="2024.7.1" />
20-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
21-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
22-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
17+
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.2" />
18+
<PackageReference Include="NLog.Web.AspNetCore" Version="5.5.0" />
19+
<PackageReference Include="Shared" Version="2025.6.1" />
20+
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.2" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.5" />
22+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.5">
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
26-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
27-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
28-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
29-
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
26+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.5" />
27+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
28+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.3" />
29+
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="9.0.5" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

0 commit comments

Comments
 (0)