Skip to content

Commit 38345a4

Browse files
authored
Upgrade to net10 / add consumer function (replacing former c# script) (#82)
* Upgrade to .NET10 * Upgrade packages and add consumer function (used to be C# script, but that's not available anymore) * Cleanup * Update README
1 parent 5d3c8dc commit 38345a4

22 files changed

+519
-54
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# .NET 10.0 Upgrade Plan
2+
3+
## Execution Steps
4+
5+
Execute steps below sequentially one by one in the order they are listed.
6+
7+
1. Validate that an .NET 10.0 SDK required for this upgrade is installed on the machine and if not, help to get it installed.
8+
2. Ensure that the SDK version specified in global.json files is compatible with the .NET 10.0 upgrade.
9+
3. Upgrade Contacts.Domain\Contacts.Domain.csproj
10+
4. Upgrade Contacts.Infrastructure\Contacts.Infrastructure.csproj
11+
5. Upgrade Contacts.Application\Contacts.Application.csproj
12+
6. Upgrade Contacts.EventsProcessor\Contacts.EventsProcessor.csproj
13+
7. Upgrade Contacts.API\Contacts.API.csproj
14+
8. Upgrade Contacts.Tests\Contacts.Tests.csproj
15+
9. Run unit tests to validate upgrade in the projects listed below:
16+
- Contacts.Tests\Contacts.Tests.csproj
17+
18+
## Settings
19+
20+
This section contains settings and data used by execution steps.
21+
22+
### Excluded projects
23+
24+
| Project name | Description |
25+
|:-----------------------------------------------|:---------------------------:|
26+
27+
### Aggregate NuGet packages modifications across all projects
28+
29+
NuGet packages used across all selected projects or their dependencies that need version update in projects that reference them.
30+
31+
| Package Name | Current Version | New Version | Description |
32+
|:-----------------------------------------------|:---------------:|:-----------:|:----------------------------------------------|
33+
| Microsoft.Extensions.Configuration | 9.0.10 | 10.0.0 | Recommended for .NET 10.0 |
34+
| Microsoft.Extensions.Configuration.Abstractions| 9.0.10 | 10.0.0 | Recommended for .NET 10.0 |
35+
| Microsoft.Extensions.Configuration.EnvironmentVariables | 9.0.10 | 10.0.0 | Recommended for .NET 10.0 |
36+
| Microsoft.Extensions.Configuration.Json | 9.0.10 | 10.0.0 | Recommended for .NET 10.0 |
37+
| Microsoft.Extensions.DependencyInjection | 9.0.10 | 10.0.0 | Recommended for .NET 10.0 |
38+
| Microsoft.Extensions.Hosting | 9.0.10 | 10.0.0 | Recommended for .NET 10.0 |
39+
| Microsoft.VisualStudio.Web.CodeGeneration.Design | 9.0.0 | 10.0.0-rc.1.25458.5 | Recommended for .NET 10.0 |
40+
41+
### Project upgrade details
42+
43+
#### Contacts.Domain\Contacts.Domain.csproj modifications
44+
45+
Project properties changes:
46+
- Target framework should be changed from `net8.0` to `net10.0`
47+
48+
#### Contacts.Infrastructure\Contacts.Infrastructure.csproj modifications
49+
50+
Project properties changes:
51+
- Target framework should be changed from `net8.0` to `net10.0`
52+
NuGet packages changes:
53+
- Microsoft.Extensions.Configuration.Abstractions should be updated from `9.0.10` to `10.0.0` (recommended for .NET 10.0)
54+
55+
#### Contacts.Application\Contacts.Application.csproj modifications
56+
57+
Project properties changes:
58+
- Target framework should be changed from `net8.0` to `net10.0`
59+
60+
#### Contacts.EventsProcessor\Contacts.EventsProcessor.csproj modifications
61+
62+
Project properties changes:
63+
- Target framework should be changed from `net8.0` to `net10.0`
64+
NuGet packages changes:
65+
- Microsoft.Extensions.Hosting should be updated from `9.0.10` to `10.0.0` (recommended for .NET 10.0)
66+
67+
#### Contacts.API\Contacts.API.csproj modifications
68+
69+
Project properties changes:
70+
- Target framework should be changed from `net8.0` to `net10.0`
71+
NuGet packages changes:
72+
- Microsoft.VisualStudio.Web.CodeGeneration.Design should be updated from `9.0.0` to `10.0.0-rc.1.25458.5` (recommended for .NET 10.0)
73+
74+
#### Contacts.Tests\Contacts.Tests.csproj modifications
75+
76+
Project properties changes:
77+
- Target framework should be changed from `net8.0` to `net10.0`
78+
NuGet packages changes:
79+
- Microsoft.Extensions.Configuration should be updated from `9.0.10` to `10.0.0` (recommended for .NET 10.0)
80+
- Microsoft.Extensions.Configuration.EnvironmentVariables should be updated from `9.0.10` to `10.0.0` (recommended for .NET 10.0)
81+
- Microsoft.Extensions.Configuration.Json should be updated from `9.0.10` to `10.0.0` (recommended for .NET 10.0)
82+
- Microsoft.Extensions.DependencyInjection should be updated from `9.0.10` to `10.0.0` (recommended for .NET 10.0)

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
**/obj/**
44
*.sln.DotSettings.user
55
**/publish
6-
.vs/**
6+
.vs/**
7+
*.user

Contacts.API/Contacts.API.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="12.1.0" />
10-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
10+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.0-rc.1.25458.5" />
1111
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
12-
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
12+
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.0.1" />
1313
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.54.1" />
14+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="18.0.2" />
15+
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="18.0.2" />
1416
</ItemGroup>
1517

1618
<ItemGroup>
17-
<PackageReference Include="Microsoft.Build" Version="17.14.28" />
19+
<PackageReference Include="Microsoft.Build" Version="18.0.2" />
1820
<ProjectReference Include="..\Contacts.Application\Contacts.Application.csproj" />
1921
<ProjectReference Include="..\Contacts.Infrastructure\Contacts.Infrastructure.csproj" />
2022
</ItemGroup>

Contacts.API/Startup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
using Microsoft.Extensions.Configuration;
1919
using Microsoft.Extensions.DependencyInjection;
2020
using Microsoft.Extensions.Hosting;
21-
using Microsoft.OpenApi.Models;
22-
using AutoMapper;
21+
using Microsoft.OpenApi;
2322

2423
namespace Contacts.API;
2524

Contacts.Application/Contacts.Application.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>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

Contacts.Domain/Contacts.Domain.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>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

0 commit comments

Comments
 (0)