Skip to content

Commit c850191

Browse files
committed
Refactor: Migrate solution to solution filter format, add central package management, and enable multi-framework targeting
1 parent be497ff commit c850191

File tree

28 files changed

+173
-281
lines changed

28 files changed

+173
-281
lines changed

CodeOfChaos.Extensions.sln

Lines changed: 0 additions & 196 deletions
This file was deleted.

CodeOfChaos.Extensions.slnx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Solution>
2+
<Folder Name="/.dev-tools/">
3+
<File Path="Directory.Packages.props" />
4+
<File Path="global.json" />
5+
<Project Path="src/Tools.CodeOfChaos.Extensions/Tools.CodeOfChaos.Extensions.csproj" />
6+
</Folder>
7+
<Folder Name="/.dev-tools/github/">
8+
<File Path=".github/workflows/onPullRequest-TestDotnet.yml" />
9+
<File Path=".github/workflows/release.yml" />
10+
<File Path=".github/workflows/workflow-todo.yml" />
11+
</Folder>
12+
<Folder Name="/examples/">
13+
<Project Path="examples/Examples.CodeOfChaos.Extensions.Analyzers/Examples.CodeOfChaos.Extensions.Analyzers.csproj" />
14+
<Project Path="examples/Examples.CodeOfChaos.Extensions.DependencyInjection/Examples.CodeOfChaos.Extensions.DependencyInjection.csproj" />
15+
</Folder>
16+
<Folder Name="/src/">
17+
<Project Path="src/CodeOfChaos.Extensions.Analyzers/CodeOfChaos.Extensions.Analyzers.csproj" />
18+
<Project Path="src/CodeOfChaos.Extensions.AspNetCore.Components/CodeOfChaos.Extensions.AspNetCore.Components.csproj" />
19+
<Project Path="src/CodeOfChaos.Extensions.AspNetCore/CodeOfChaos.Extensions.AspNetCore.csproj" />
20+
<Project Path="src/CodeOfChaos.Extensions.DependencyInjection.Generators/CodeOfChaos.Extensions.DependencyInjection.Generators.csproj" />
21+
<Project Path="src/CodeOfChaos.Extensions.DependencyInjection/CodeOfChaos.Extensions.DependencyInjection.csproj" />
22+
<Project Path="src/CodeOfChaos.Extensions.EntityFrameworkCore/CodeOfChaos.Extensions.EntityFrameworkCore.csproj" />
23+
<Project Path="src/CodeOfChaos.Extensions.FluentValidation/CodeOfChaos.Extensions.FluentValidation.csproj" />
24+
<Project Path="src/CodeOfChaos.Extensions.MicrosoftLogging/CodeOfChaos.Extensions.MicrosoftLogging.csproj" />
25+
<Project Path="src/CodeOfChaos.Extensions.ObjectPool/CodeOfChaos.Extensions.ObjectPool.csproj" />
26+
<Project Path="src/CodeOfChaos.Extensions.Serilog/CodeOfChaos.Extensions.Serilog.csproj" />
27+
<Project Path="src/CodeOfChaos.Extensions/CodeOfChaos.Extensions.csproj" />
28+
</Folder>
29+
<Folder Name="/tests/">
30+
<Project Path="tests/Benchmarks.CodeOfChaos.Extensions/Benchmarks.CodeOfChaos.Extensions.csproj" />
31+
<Project Path="tests/Tests.CodeOfChaos.Extensions.Analyzers/Tests.CodeOfChaos.Extensions.Analyzers.csproj" />
32+
<Project Path="tests/Tests.CodeOfChaos.Extensions.AspNetCore.Components/Tests.CodeOfChaos.Extensions.AspNetCore.Components.csproj" />
33+
<Project Path="tests/Tests.CodeOfChaos.Extensions.AspNetCore/Tests.CodeOfChaos.Extensions.AspNetCore.csproj" />
34+
<Project Path="tests/Tests.CodeOfChaos.Extensions.DependencyInjection/Tests.CodeOfChaos.Extensions.DependencyInjection.csproj" />
35+
<Project Path="tests/Tests.CodeOfChaos.Extensions.EntityFrameworkCore/Tests.CodeOfChaos.Extensions.EntityFrameworkCore.csproj" />
36+
<Project Path="tests/Tests.CodeOfChaos.Extensions.FluentValidation/Tests.CodeOfChaos.Extensions.FluentValidation.csproj" />
37+
<Project Path="tests/Tests.CodeOfChaos.Extensions.ObjectPool/Tests.CodeOfChaos.Extensions.ObjectPool.csproj" />
38+
<Project Path="tests/Tests.CodeOfChaos.Extensions.Serilog/Tests.CodeOfChaos.Extensions.Serilog.csproj" />
39+
<Project Path="tests/Tests.CodeOfChaos.Extensions/Tests.CodeOfChaos.Extensions.csproj" />
40+
</Folder>
41+
</Solution>

Directory.Packages.props

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- Enable central package management, https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management -->
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<!-- .NET 10 -->
7+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
8+
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="10.0.0" />
9+
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
10+
</ItemGroup>
11+
<!-- .NET 9 -->
12+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
13+
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="[9.0.11, 10.0.0)" />
14+
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[9.0.11, 10.0.0)" />
15+
</ItemGroup>
16+
<!-- Common packages for all frameworks -->
17+
<ItemGroup>
18+
<PackageVersion Include="CodeOfChaos.Ansi" Version="1.2.4" />
19+
<PackageVersion Include="CodeOfChaos.CliArgsParser.Library" Version="5.1.3" />
20+
<PackageVersion Include="CodeOfChaos.GeneratorTools" Version="2.2.1" />
21+
<PackageVersion Include="FluentValidation" Version="12.1.0" />
22+
<PackageVersion Include="IsExternalInit" Version="1.0.3" />
23+
<PackageVersion Include="JetBrains.Annotations" Version="2025.2.2" />
24+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" />
25+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
26+
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
27+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
28+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
29+
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="10.0.0" />
30+
<PackageVersion Include="Serilog" Version="4.3.0" />
31+
<PackageVersion Include="Serilog" Version="4.3.0" />
32+
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0" />
33+
<PackageVersion Include="Serilog.Sinks.Async" Version="2.1.0" />
34+
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
35+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.6" />
36+
<PackageVersion Include="Moq" Version="4.20.72" />
37+
<PackageVersion Include="TUnit" Version="1.1.10" />
38+
<PackageVersion Include="Bogus" Version="35.6.5" />
39+
<PackageVersion Include="CodeOfChaos.Testing.TUnit" Version="0.16.2" />
40+
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
41+
</ItemGroup>
42+
</Project>

examples/Examples.CodeOfChaos.Extensions.Analyzers/Examples.CodeOfChaos.Extensions.Analyzers.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>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

examples/Examples.CodeOfChaos.Extensions.DependencyInjection/Examples.CodeOfChaos.Extensions.DependencyInjection.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>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"test": {
3+
"runner": "Microsoft.Testing.Platform"
4+
}
5+
}

src/CodeOfChaos.Extensions.Analyzers/CodeOfChaos.Extensions.Analyzers.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
</PropertyGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0">
30+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
3131
<PrivateAssets>all</PrivateAssets>
3232
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3333
</PackageReference>
34-
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.14.0">
34+
<PackageReference Include="Microsoft.CodeAnalysis.Common">
3535
<PrivateAssets>all</PrivateAssets>
3636
</PackageReference>
37-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0">
37+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
3838
<PrivateAssets>all</PrivateAssets>
3939
</PackageReference>
4040
</ItemGroup>

src/CodeOfChaos.Extensions.AspNetCore.Components/CodeOfChaos.Extensions.AspNetCore.Components.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.10" />
32+
<PackageReference Include="Microsoft.AspNetCore.Components"/>
3333
</ItemGroup>
3434

3535
<ItemGroup>

src/CodeOfChaos.Extensions.AspNetCore/CodeOfChaos.Extensions.AspNetCore.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
@@ -23,8 +23,8 @@
2323
</PropertyGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Serilog" Version="4.3.0" />
27-
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
26+
<PackageReference Include="Serilog" />
27+
<PackageReference Include="Serilog.AspNetCore" />
2828
</ItemGroup>
2929

3030
<ItemGroup>

src/CodeOfChaos.Extensions.DependencyInjection.Generators/CodeOfChaos.Extensions.DependencyInjection.Generators.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
</ItemGroup>
3737

3838
<ItemGroup>
39-
<PackageReference Include="IsExternalInit" Version="1.0.3">
39+
<PackageReference Include="IsExternalInit">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>
43-
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
44-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" PrivateAssets="all" />
45-
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" PrivateAssets="all" />
46-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" PrivateAssets="all" />
47-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="2.2.1">
43+
<PackageReference Include="JetBrains.Annotations" />
44+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
45+
<PackageReference Include="Microsoft.CodeAnalysis.Common" PrivateAssets="all" />
46+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
47+
<PackageReference Include="CodeOfChaos.GeneratorTools">
4848
<PrivateAssets>all</PrivateAssets>
4949
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5050
</PackageReference>

0 commit comments

Comments
 (0)