Skip to content

Commit 2313453

Browse files
authored
Add support for .NET 9 (#155)
1 parent 1a9d82a commit 2313453

File tree

11 files changed

+56
-42
lines changed

11 files changed

+56
-42
lines changed

.github/workflows/BuildAndPack.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- uses: actions/setup-dotnet@v4
3737
with:
3838
dotnet-version: |
39+
9.0.x
3940
8.0.x
4041
7.0.x
4142
6.0.x
@@ -67,6 +68,7 @@ jobs:
6768
- uses: actions/setup-dotnet@v4
6869
with:
6970
dotnet-version: |
71+
9.0.x
7072
8.0.x
7173
7.0.x
7274
6.0.x
@@ -98,6 +100,7 @@ jobs:
98100
- uses: actions/setup-dotnet@v4
99101
with:
100102
dotnet-version: |
103+
9.0.x
101104
8.0.x
102105
7.0.x
103106
6.0.x

.nuke/build.schema.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"properties": {
4-
"Configuration": {
5-
"type": "string",
6-
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
7-
"enum": [
8-
"Debug",
9-
"Release"
10-
]
11-
},
12-
"GithubToken": {
13-
"type": "string"
14-
},
15-
"NuGetToken": {
16-
"type": "string"
17-
},
18-
"PackagesDirectory": {
19-
"type": "string"
20-
},
21-
"Solution": {
22-
"type": "string",
23-
"description": "Path to a solution file that is automatically loaded"
24-
}
25-
},
263
"definitions": {
274
"Host": {
285
"type": "string",
@@ -124,5 +101,34 @@
124101
}
125102
}
126103
},
127-
"$ref": "#/definitions/NukeBuild"
104+
"allOf": [
105+
{
106+
"properties": {
107+
"Configuration": {
108+
"type": "string",
109+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
110+
"enum": [
111+
"Debug",
112+
"Release"
113+
]
114+
},
115+
"GithubToken": {
116+
"type": "string"
117+
},
118+
"NuGetToken": {
119+
"type": "string"
120+
},
121+
"PackagesDirectory": {
122+
"type": "string"
123+
},
124+
"Solution": {
125+
"type": "string",
126+
"description": "Path to a solution file that is automatically loaded"
127+
}
128+
}
129+
},
130+
{
131+
"$ref": "#/definitions/NukeBuild"
132+
}
133+
]
128134
}

build/Build.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Build : NukeBuild
5050
.Executes(() =>
5151
{
5252
DotNetRestore(s => s
53-
.When(!string.IsNullOrEmpty(PackagesDirectory), x=>x.SetPackageDirectory(PackagesDirectory))
53+
.When(_ => !string.IsNullOrEmpty(PackagesDirectory), x=>x.SetPackageDirectory(PackagesDirectory))
5454
.SetProjectFile(Solution));
5555
});
5656

@@ -61,7 +61,7 @@ class Build : NukeBuild
6161
DotNetBuild(s => s
6262
.SetProjectFile(Solution)
6363
.SetConfiguration(Configuration)
64-
.When(IsServerBuild, x => x.SetProperty("ContinuousIntegrationBuild", "true"))
64+
.When(_ => IsServerBuild, x => x.SetProperty("ContinuousIntegrationBuild", "true"))
6565
.EnableNoRestore());
6666
});
6767

@@ -85,7 +85,7 @@ class Build : NukeBuild
8585
DotNetPack(s => s
8686
.SetConfiguration(Configuration)
8787
.SetOutputDirectory(ArtifactsDirectory)
88-
.When(IsServerBuild, x => x.SetProperty("ContinuousIntegrationBuild", "true"))
88+
.When(_ => IsServerBuild, x => x.SetProperty("ContinuousIntegrationBuild", "true"))
8989
.EnableNoBuild()
9090
.EnableNoRestore()
9191
.SetProject(Solution));
@@ -110,12 +110,12 @@ class Build : NukeBuild
110110
}
111111

112112
DotNetRestore(s => s
113-
.When(!string.IsNullOrEmpty(PackagesDirectory), x => x.SetPackageDirectory(PackagesDirectory))
113+
.When(_ => !string.IsNullOrEmpty(PackagesDirectory), x => x.SetPackageDirectory(PackagesDirectory))
114114
.SetConfigFile(RootDirectory / "NuGet.integration-tests.config")
115115
.CombineWith(projectFiles, (s, p) => s.SetProjectFile(p)));
116116

117117
DotNetBuild(s => s
118-
.When(!string.IsNullOrEmpty(PackagesDirectory), x=>x.SetPackageDirectory(PackagesDirectory))
118+
.When(_ => !string.IsNullOrEmpty(PackagesDirectory), x=>x.SetPackageDirectory(PackagesDirectory))
119119
.EnableNoRestore()
120120
.SetConfiguration(Configuration)
121121
.CombineWith(projectFiles, (s, p) => s.SetProjectFile(p)));

build/_build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<RootNamespace></RootNamespace>
77
<NoWarn>CS0649;CS0169</NoWarn>
88
<NukeRootDirectory>..</NukeRootDirectory>
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Nuke.Common" Version="8.1.0" />
14+
<PackageReference Include="Nuke.Common" Version="9.0.3" />
1515
</ItemGroup>
1616

1717
</Project>

test/IntegrationLibraries.props

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<Project>
2+
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0'">
3+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
4+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
5+
</ItemGroup>
6+
27
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0'">
3-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0-*" />
4-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-*" />
8+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
510
</ItemGroup>
611

712
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0'">
8-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0*" />
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0*" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.20" />
1015
</ItemGroup>
1116

1217
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
@@ -30,7 +35,7 @@
3035
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
3136
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
3237
<PackageReference Include="Dapper" Version="2.0.90" />
33-
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
38+
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
3439
<PackageReference Include="xunit" Version="2.4.2" />
3540
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
3641
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

test/StronglyTypedIds.IntegrationTests.ExternalIds/StronglyTypedIds.IntegrationTests.ExternalIds.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-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net48;$(TargetFrameworks)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

test/StronglyTypedIds.IntegrationTests.Types/StronglyTypedIds.IntegrationTests.Types.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-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net48;$(TargetFrameworks)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

test/StronglyTypedIds.IntegrationTests/StronglyTypedIds.IntegrationTests.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-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net48;$(TargetFrameworks)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

test/StronglyTypedIds.Nuget.Attributes.IntegrationTests/StronglyTypedIds.Nuget.Attributes.IntegrationTests.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-
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net48;$(TargetFrameworks)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
<DefineConstants>STRONGLY_TYPED_ID_EMBED_ATTRIBUTES</DefineConstants>

test/StronglyTypedIds.Nuget.IntegrationTests/StronglyTypedIds.Nuget.IntegrationTests.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-
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net48;$(TargetFrameworks)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)