feat: upgrade application to .NET 10
All checks were successful
Caddy Manager CI build / docker (push) Successful in 6m37s

Preserve configuration defaults with the .NET 10 binder and update
dependencies, Docker builds, CI, and test tooling.
This commit is contained in:
2026-07-26 15:55:11 +07:00
parent b5cbad3664
commit 7380680230
13 changed files with 298 additions and 494 deletions

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
@@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
@@ -21,17 +21,17 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="AwesomeAssertions" Version="9.5.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.10" />
</ItemGroup>
<ItemGroup>
@@ -41,7 +41,7 @@
<ItemGroup>
<Using Include="Xunit" />
<Using Include="FluentAssertions" />
<Using Include="AwesomeAssertions" />
<Using Include="Moq" />
</ItemGroup>

View File

@@ -66,7 +66,7 @@ Coverage reports exclude:
## Test Frameworks and Libraries
- **xUnit**: Primary testing framework
- **FluentAssertions**: For readable assertions
- **AwesomeAssertions**: For readable assertions
- **Moq**: For mocking dependencies
- **Coverlet**: For code coverage analysis
@@ -122,7 +122,7 @@ Common test data is provided through the `TestHelper` class:
2. **Single Responsibility**: Each test should verify one specific behavior
3. **Independence**: Tests should not depend on each other and should be able to run in any order
4. **Cleanup**: Use `IDisposable` or cleanup methods to remove temporary resources
5. **Readable Assertions**: Use FluentAssertions for more readable test assertions
5. **Readable Assertions**: Use AwesomeAssertions for more readable test assertions
6. **Mock Verification**: Verify that mocked methods are called as expected when relevant
## Continuous Integration

View File

@@ -15,7 +15,7 @@
<Exclude>[*]Microsoft.*</Exclude>
<Exclude>[*]System.*</Exclude>
<Exclude>[*]Moq.*</Exclude>
<Exclude>[*]FluentAssertions.*</Exclude>
<Exclude>[*]AwesomeAssertions.*</Exclude>
<Exclude>[*]xunit.*</Exclude>
<ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<SingleHit>false</SingleHit>