Skip to content

Commit 809c0a3

Browse files
committed
Update to .NET 10, reorganize solution, and refactor dependencies
Theme: Migration to .NET 10 and Solution Reorganization -- Upgrade all projects and test targets to .NET 10 (net10.0) for future compatibility and feature support. -- Refactor package references to use new version properties (`AspVer`, `ExtVer`, `PgVer`) for improved dependency management. -- Update `Directory.Build.props` to include net10.0 and set new internal package versions. -- Revise GitHub Actions workflows to build and test with .NET 10.x (prerelease). -- Reorganize solution structure in `RoyalCode.EnterprisePatterns.sln` with new folders and updated project nesting. -- Change package icon reference to `icon2.png` in `base.targets`. -- Update test SDK and dependencies in `tests.targets` to latest versions. -- Add conditional compilation in Outbox API to handle `.WithOpenApi()` for .NET 10 and above. -- Ensure all affected projects reference correct package versions according to new properties.
1 parent 2302589 commit 809c0a3

22 files changed

Lines changed: 81 additions & 49 deletions

File tree

.github/workflows/domain-nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup .NET
1919
uses: actions/setup-dotnet@v4
2020
with:
21-
dotnet-version: '9.0.x'
21+
dotnet-version: '10.0.x'
2222
include-prerelease: true
2323

2424
- name: Build and pack Entities

.github/workflows/persistence-nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup .NET
1919
uses: actions/setup-dotnet@v4
2020
with:
21-
dotnet-version: '9.0.x'
21+
dotnet-version: '10.0.x'
2222
include-prerelease: true
2323

2424
- name: Build and pack Repositories Abstractions
Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
3-
<LibTargets>net8.0;net9.0</LibTargets>
4-
<AspTargets>net8.0;net9.0</AspTargets>
5-
<MsgTargets>net8.0;net9.0</MsgTargets>
3+
<LibTargets>net8.0;net9.0;net10.0</LibTargets>
4+
<AspTargets>net8.0;net9.0;net10.0</AspTargets>
5+
<MsgTargets>net8.0;net9.0;net10.0</MsgTargets>
66
</PropertyGroup>
77
<PropertyGroup>
88

@@ -18,15 +18,25 @@
1818
<MsgVer>0.1.0</MsgVer>
1919
<MsgVerPreview>-preview-0.1</MsgVerPreview>
2020
</PropertyGroup>
21-
<PropertyGroup>
22-
<DotNetCoreVersion Condition="'$(TargetFramework)' == 'net8.0'">8.0.0</DotNetCoreVersion>
23-
<DotNetCoreVersion Condition="'$(TargetFramework)' == 'net9.0'">9.0.0</DotNetCoreVersion>
21+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
22+
<AspVer>8.0.23</AspVer>
23+
<ExtVer>8.0.2</ExtVer>
24+
<PgVer>8.0.10</PgVer>
25+
</PropertyGroup>
26+
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
27+
<AspVer>9.0.0</AspVer>
28+
<ExtVer>9.0.0</ExtVer>
2429
<PgVer>9.0.0</PgVer>
2530
</PropertyGroup>
31+
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
32+
<AspVer>10.0.0</AspVer>
33+
<ExtVer>10.0.0</ExtVer>
34+
<PgVer>10.0.0</PgVer>
35+
</PropertyGroup>
2636
<PropertyGroup>
27-
<ValVer>1.0.0-preview-2.0</ValVer>
28-
<ProbVer>1.0.0-preview-4.4</ProbVer>
37+
<ValVer>1.0.0-preview-4.0</ValVer>
38+
<ProbVer>1.0.0-preview-6.0</ProbVer>
2939
<HintVer>1.0.0</HintVer>
30-
<SearchVer>0.8.2</SearchVer>
40+
<SearchVer>0.9.0</SearchVer>
3141
</PropertyGroup>
3242
</Project>

RoyalCode.EnterprisePatterns/RoyalCode.Commands.Automation/RoyalCode.Commands.Automation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(DotNetCoreVersion)" />
25+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(AspVer)" />
2626
<PackageReference Include="RoyalCode.Extensions.AsyncExpressionsBuilders" Version="0.3.0" />
2727
</ItemGroup>
2828

RoyalCode.EnterprisePatterns/RoyalCode.Commands.Tests/RoyalCode.Commands.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Import Project="..\tests.targets" />
44

55
<ItemGroup>
6-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(DotNetCoreVersion)" />
7-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(DotNetCoreVersion)" />
6+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(AspVer)" />
7+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(AspVer)" />
88

99
<ProjectReference Include="..\RoyalCode.Commands.Abstractions\RoyalCode.Commands.Abstractions.csproj" />
1010

RoyalCode.EnterprisePatterns/RoyalCode.EnterprisePatterns.sln

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.31911.260
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11104.47 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RoyalCode.Repositories.Abstractions", "RoyalCode.Repositories.Abstractions\RoyalCode.Repositories.Abstractions.csproj", "{32ED862A-FFC6-40A7-8BBA-0807AC5B7BE5}"
77
EndProject
@@ -80,6 +80,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RoyalCode.WorkContext.Postg
8080
EndProject
8181
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RoyalCode.WorkContext.SqlServer", "RoyalCode.WorkContext.SqlServer\RoyalCode.WorkContext.SqlServer.csproj", "{80B13539-A3CB-4C66-B1E2-189B1FDC4D04}"
8282
EndProject
83+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Abstractions", "Abstractions", "{9E60E90A-95C1-4B4A-B7CD-ADDC0EBB53CF}"
84+
EndProject
85+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EntityFramework", "EntityFramework", "{DF5DDC2D-A42A-402C-8633-06D9BA0C416B}"
86+
EndProject
87+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosting", "Hosting", "{D579FD6B-0FFC-4735-A27D-C6E0594FE305}"
88+
EndProject
8389
Global
8490
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8591
Debug|Any CPU = Debug|Any CPU
@@ -195,18 +201,18 @@ Global
195201
HideSolutionNode = FALSE
196202
EndGlobalSection
197203
GlobalSection(NestedProjects) = preSolution
198-
{32ED862A-FFC6-40A7-8BBA-0807AC5B7BE5} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
204+
{32ED862A-FFC6-40A7-8BBA-0807AC5B7BE5} = {9E60E90A-95C1-4B4A-B7CD-ADDC0EBB53CF}
199205
{E6E2DDCC-0629-4BBF-98E8-EECA1CA7A8A1} = {3EED25DE-FBB1-4451-8F44-D072B43A2D66}
200206
{9D8033FC-7CB8-40E0-97B2-81A710F920D1} = {3EED25DE-FBB1-4451-8F44-D072B43A2D66}
201207
{9354412F-7A51-471A-A52E-86D766DE5ACA} = {3EED25DE-FBB1-4451-8F44-D072B43A2D66}
202208
{3EED25DE-FBB1-4451-8F44-D072B43A2D66} = {A54A32AB-DA08-4825-A246-DE5A8C69D588}
203209
{4847AB47-2B45-4A3A-BF3B-7F010F21ED86} = {A54A32AB-DA08-4825-A246-DE5A8C69D588}
204-
{0F585941-ACDB-46FA-B909-EA1FE71C7509} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
210+
{0F585941-ACDB-46FA-B909-EA1FE71C7509} = {9E60E90A-95C1-4B4A-B7CD-ADDC0EBB53CF}
205211
{2636C6E2-AA9F-4948-BF46-D0772F73D265} = {D91CABB8-AE3F-4FE8-B8E3-DEDBD6C2EDB6}
206-
{D067CEAD-BE9E-4121-9288-A876A0EAE098} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
207-
{61A13F69-7346-4115-B517-976BADE0B926} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
208-
{9B833B9C-92BB-43AB-A068-5C1317F08F82} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
209-
{95E28BC1-E43B-4BB0-8136-B27119509A24} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
212+
{D067CEAD-BE9E-4121-9288-A876A0EAE098} = {9E60E90A-95C1-4B4A-B7CD-ADDC0EBB53CF}
213+
{61A13F69-7346-4115-B517-976BADE0B926} = {DF5DDC2D-A42A-402C-8633-06D9BA0C416B}
214+
{9B833B9C-92BB-43AB-A068-5C1317F08F82} = {DF5DDC2D-A42A-402C-8633-06D9BA0C416B}
215+
{95E28BC1-E43B-4BB0-8136-B27119509A24} = {DF5DDC2D-A42A-402C-8633-06D9BA0C416B}
210216
{A851D07A-3480-4505-AEB4-83A5B61092E4} = {8198A8B4-6CCB-4347-97C0-23AFFB879CA1}
211217
{8198A8B4-6CCB-4347-97C0-23AFFB879CA1} = {A54A32AB-DA08-4825-A246-DE5A8C69D588}
212218
{E3A5F862-236E-4F18-AF22-847F297DE7A3} = {DE4106C5-D631-4B42-AB27-0103F5705693}
@@ -223,10 +229,13 @@ Global
223229
{31027174-F707-49FB-A051-3FBB3C6FFA35} = {80CCF203-3C6E-4B07-B011-04F7800EA52E}
224230
{79F643A3-9BFA-4200-A9FB-83A713A6C3D2} = {80CCF203-3C6E-4B07-B011-04F7800EA52E}
225231
{BDAFD007-FEB0-44B8-8A44-5C6F6E540B45} = {80CCF203-3C6E-4B07-B011-04F7800EA52E}
226-
{E7AD2D84-8249-47DC-A400-93572C952755} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
227-
{63BD398D-0D71-4B28-87A8-E6D335730F9C} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
228-
{430B93E7-7F7C-4DAB-95EF-BBEDD98338B7} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
229-
{80B13539-A3CB-4C66-B1E2-189B1FDC4D04} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
232+
{E7AD2D84-8249-47DC-A400-93572C952755} = {D579FD6B-0FFC-4735-A27D-C6E0594FE305}
233+
{63BD398D-0D71-4B28-87A8-E6D335730F9C} = {DF5DDC2D-A42A-402C-8633-06D9BA0C416B}
234+
{430B93E7-7F7C-4DAB-95EF-BBEDD98338B7} = {DF5DDC2D-A42A-402C-8633-06D9BA0C416B}
235+
{80B13539-A3CB-4C66-B1E2-189B1FDC4D04} = {DF5DDC2D-A42A-402C-8633-06D9BA0C416B}
236+
{9E60E90A-95C1-4B4A-B7CD-ADDC0EBB53CF} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
237+
{DF5DDC2D-A42A-402C-8633-06D9BA0C416B} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
238+
{D579FD6B-0FFC-4735-A27D-C6E0594FE305} = {DD6336C0-C66B-44CD-9BEA-D9ED66EEC7BF}
230239
EndGlobalSection
231240
GlobalSection(ExtensibilityGlobals) = postSolution
232241
SolutionGuid = {9FAC6C2E-62DE-4665-BB16-4E7D445FAB26}

RoyalCode.EnterprisePatterns/RoyalCode.EntityFramework.StagedSaveChanges/RoyalCode.EntityFramework.StagedSaveChanges.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="$(DotNetCoreVersion)" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="$(AspVer)" />
2020
</ItemGroup>
2121

2222
</Project>

RoyalCode.EnterprisePatterns/RoyalCode.Events.Outbox.Abstractions/RoyalCode.Events.Outbox.Abstractions.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(DotNetCoreVersion)" />
18-
<PackageReference Include="Microsoft.Extensions.Options" Version="$(DotNetCoreVersion)" />
17+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(ExtVer)" />
18+
<PackageReference Include="Microsoft.Extensions.Options" Version="$(ExtVer)" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

RoyalCode.EnterprisePatterns/RoyalCode.Events.Outbox.Api/OutboxApi.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,30 @@ public static void MapOutbox(this RouteGroupBuilder group)
3737
group.MapPost("consumer", RegisterConsumerAsync)
3838
.WithName("register-consumer")
3939
.WithDescription("Register a new outbox consumer")
40+
#if NET10_0_OR_GREATER
41+
;
42+
#else
4043
.WithOpenApi();
44+
#endif
4145

4246
group.MapGet("consumer/{consumer}/messages", GetConsumerMessagesAsync)
4347
.WithName("get-outbox-messages")
4448
.WithDescription("get the outbox next messages for the consumer")
49+
#if NET10_0_OR_GREATER
50+
;
51+
#else
4552
.WithOpenApi();
53+
#endif
4654

4755
group.MapPost("consumer/{consumer}/commit", CommitConsumedAsync)
4856
.WithName("commit-consumed-outbox-messages")
4957
.WithDescription("Commit the consumed messages")
58+
#if NET10_0_OR_GREATER
59+
;
60+
#else
5061
.WithOpenApi();
62+
#endif
63+
5164
}
5265

5366
private static async Task<OkMatch> CommitConsumedAsync(

RoyalCode.EnterprisePatterns/RoyalCode.Events.Outbox.Api/RoyalCode.Events.Outbox.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ItemGroup>
1717
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1818
<PackageReference Include="RoyalCode.SmartProblems.ApiResults" Version="$(ProbVer)" />
19-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="$(DotNetCoreVersion)" />
19+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="$(AspVer)" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

0 commit comments

Comments
 (0)