Skip to content

Commit 6b95d6c

Browse files
authored
chore(net10.0): add support for .net 10.0 throughout (#486)
* chore(net10.0): add support for .net 10.0 throughout * chore(net10.0): add support for .net 10.0 throughout * chore(net10.0): add support for .net 10.0 throughout * chore(net10.0): add support for .net 10.0 throughout
1 parent 1f0a839 commit 6b95d6c

38 files changed

Lines changed: 90 additions & 2715 deletions

File tree

.github/workflows/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v2
2626
- uses: actions/setup-dotnet@v3
2727
with:
28-
dotnet-version: '8.0.x'
28+
dotnet-version: '10.0.x'
2929
dotnet-quality: 'preview'
3030

3131
- name: Coverlet coverage unit test

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: actions/checkout@v2
4242
- uses: actions/setup-dotnet@v3
4343
with:
44-
dotnet-version: '8.0.x'
44+
dotnet-version: '10.0.x'
4545
dotnet-quality: 'preview'
4646

4747
# Initializes the CodeQL tools for scanning.

build/ci-build.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ resources:
2929
variables:
3030
- group: 'Arcus Web API - Integration Testing'
3131
- group: 'Arcus Security - Integration Testing'
32-
- group: 'Arcus - GitHub Package Registry'
3332
- group: 'Build Configuration'
33+
- group: 'MyGet'
3434
- template: ./variables/build.yml
3535
- template: ./variables/test.yml
3636

@@ -86,23 +86,6 @@ stages:
8686
includePreviewVersions: $(DotNet.Sdk.IncludePreviewVersions)
8787
projectName: '$(Project).Tests.Unit'
8888

89-
- stage: DockerIntegrationTests
90-
displayName: Integration Tests
91-
dependsOn: Build
92-
condition: succeeded()
93-
jobs:
94-
- job: DockerIntegrationTests
95-
displayName: 'Run Docker integration tests'
96-
pool:
97-
vmImage: '$(Vm.Image)'
98-
steps:
99-
- task: DownloadPipelineArtifact@2
100-
displayName: 'Download build artifacts'
101-
inputs:
102-
artifact: 'Build'
103-
path: '$(Build.SourcesDirectory)'
104-
- template: templates/run-docker-integration-tests.yml
105-
10689
- stage: SelfContainedIntegrationTests
10790
displayName: Integration Tests
10891
dependsOn: Build
@@ -129,7 +112,6 @@ stages:
129112
displayName: 'Release to MyGet'
130113
dependsOn:
131114
- UnitTests
132-
- DockerIntegrationTests
133115
- SelfContainedIntegrationTests
134116
condition: succeeded()
135117
jobs:
@@ -143,4 +125,9 @@ stages:
143125
inputs:
144126
artifact: 'Build'
145127
path: '$(Build.SourcesDirectory)'
146-
- template: nuget/publish-preview-package.yml@templates
128+
- task: DotNetCoreCLI@2
129+
displayName: 'Push to MyGet.org'
130+
inputs:
131+
command: 'custom'
132+
custom: 'nuget'
133+
arguments: 'push src/**/*.nupkg --skip-duplicate --source $(MyGet.SourceUrl) --api-key $(MyGet.ApiKey)'

build/nuget-release.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,6 @@ stages:
7676
includePreviewVersions: $(DotNet.Sdk.IncludePreviewVersions)
7777
projectName: '$(Project).Tests.Unit'
7878

79-
- stage: DockerIntegrationTests
80-
displayName: Integration Tests
81-
dependsOn: Build
82-
condition: succeeded()
83-
jobs:
84-
- job: DockerIntegrationTests
85-
displayName: 'Run Docker integration tests'
86-
pool:
87-
vmImage: '$(Vm.Image)'
88-
steps:
89-
- task: DownloadPipelineArtifact@2
90-
displayName: 'Download build artifacts'
91-
inputs:
92-
artifact: 'Build'
93-
path: '$(Build.SourcesDirectory)'
94-
- template: templates/run-docker-integration-tests.yml
95-
9679
- stage: SelfContainedIntegrationTests
9780
displayName: Integration Tests
9881
dependsOn: Build
@@ -119,7 +102,6 @@ stages:
119102
displayName: 'Release to NuGet.org'
120103
dependsOn:
121104
- UnitTests
122-
- DockerIntegrationTests
123105
- SelfContainedIntegrationTests
124106
condition: succeeded()
125107
jobs:

build/variables/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variables:
2-
DotNet.Sdk.Version: '8.0.x'
2+
DotNet.Sdk.Version: '10.0.x'
33
# Backwards compatible .NET SDK version
4-
DotNet.Sdk.VersionBC: '6.0.100'
5-
DotNet.Sdk.IncludePreviewVersions: false
4+
DotNet.Sdk.VersionBC: '8.0.x'
5+
DotNet.Sdk.IncludePreviewVersions: true
66
Project: 'Arcus.WebApi'
77
Vm.Image: 'ubuntu-latest'

src/Arcus.WebApi.Hosting/Arcus.WebApi.Hosting.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>net8.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
55
<Authors>Arcus</Authors>
66
<Company>Arcus</Company>
77
<RepositoryType>Git</RepositoryType>
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net6.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
55
<Authors>Arcus</Authors>
66
<Company>Arcus</Company>
77
<RepositoryType>Git</RepositoryType>
@@ -21,24 +21,15 @@
2121
<ItemGroup>
2222
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
2323
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" />
24-
<None Include="..\..\docs\static\img\icon.png" Pack="true" PackagePath="\"/>
25-
</ItemGroup>
26-
27-
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.1'">
28-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
29-
</ItemGroup>
30-
31-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
32-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.2.0" />
33-
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" />
34-
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
24+
<None Include="..\..\docs\static\img\icon.png" Pack="true" PackagePath="\" />
3525
</ItemGroup>
3626

3727
<ItemGroup>
28+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
3829
<PackageReference Include="Arcus.Observability.Telemetry.Core" Version="[3.0.0,4.0.0)" />
3930
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Enrichers" Version="[3.0.0,4.0.0)" />
4031
<PackageReference Include="Arcus.Observability.Correlation" Version="[3.0.0,4.0.0)" />
41-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
32+
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />
4233
</ItemGroup>
4334

4435
</Project>

src/Arcus.WebApi.Logging.Core/RequestTracking/RequestTrackingTemplate.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
using System;
1+
using Microsoft.AspNetCore.Http;
2+
using Microsoft.Extensions.Logging;
3+
using Microsoft.Extensions.Logging.Abstractions;
4+
using Microsoft.Extensions.Primitives;
5+
6+
using System;
27
using System.Collections.Generic;
38
using System.Collections.ObjectModel;
49
using System.IO;
510
using System.Linq;
611
using System.Net;
712
using System.Threading.Tasks;
8-
using Microsoft.AspNetCore.Http;
9-
using Microsoft.Extensions.Logging;
10-
using Microsoft.Extensions.Logging.Abstractions;
11-
using Microsoft.Extensions.Primitives;
1213

1314
namespace Arcus.WebApi.Logging.Core.RequestTracking
1415
{
@@ -78,7 +79,7 @@ protected bool AllowedToTrackStatusCode(int responseStatusCode, IEnumerable<Stat
7879

7980
StatusCodeRange[] combinedStatusCodeRanges =
8081
optionsTrackedStatusCodes
81-
.Select(code => new StatusCodeRange((int) code))
82+
.Select(code => new StatusCodeRange((int)code))
8283
.Concat(attributeTrackedStatusCodes ?? Enumerable.Empty<StatusCodeRange>())
8384
.Concat(optionsTrackedStatusCodeRanges)
8485
.Where(range => range != null)
@@ -116,7 +117,7 @@ protected Dictionary<string, object> CreateTelemetryContext(string requestBody,
116117
try
117118
{
118119
IDictionary<string, StringValues> headers = GetSanitizedRequestHeaders(requestHeaders, logger);
119-
Dictionary<string, string> telemetryContext = headers.ToDictionary(header => header.Key, header => string.Join(",", header.Value));
120+
Dictionary<string, string> telemetryContext = headers.ToDictionary(header => header.Key, header => string.Join(",", header.Value.ToString()));
120121

121122
if (!string.IsNullOrWhiteSpace(requestBody))
122123
{

src/Arcus.WebApi.Logging/Arcus.WebApi.Logging.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net6.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
55
<Authors>Arcus</Authors>
66
<Company>Arcus</Company>
77
<RepositoryType>Git</RepositoryType>
@@ -24,24 +24,13 @@
2424
<None Include="..\..\docs\static\img\icon.png" Pack="true" PackagePath="\" />
2525
</ItemGroup>
2626

27-
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.1'">
28-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
29-
</ItemGroup>
30-
31-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
32-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
33-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
34-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.2.0" />
35-
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
36-
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
37-
</ItemGroup>
38-
3927
<ItemGroup>
28+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
4029
<PackageReference Include="Arcus.Observability.Telemetry.Core" Version="[3.0.0,4.0.0)" />
4130
<PackageReference Include="Arcus.Observability.Telemetry.AspNetCore" Version="[3.0.0,4.0.0)" />
4231
<PackageReference Include="Arcus.Observability.Correlation" Version="[3.0.0,4.0.0)" />
4332
<PackageReference Include="Arcus.Observability.Telemetry.Serilog.Enrichers" Version="[3.0.0,4.0.0)" />
44-
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
33+
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.23.0" />
4534
</ItemGroup>
4635

4736
<ItemGroup>

src/Arcus.WebApi.OpenApi.Extensions/Arcus.WebApi.OpenApi.Extensions.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-
<TargetFrameworks>net8.0;net6.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
55
<Authors>Arcus</Authors>
66
<Company>Arcus</Company>
77
<RepositoryType>Git</RepositoryType>
@@ -27,8 +27,8 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" Condition="'$(TargetFramework)' != 'netstandard2.1'" />
31-
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" Condition="'$(TargetFramework)' == 'netstandard2.1'" />
30+
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.3" />
31+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="[8.*,11.0.0)" />
3232
</ItemGroup>
3333

3434
<ItemGroup>

0 commit comments

Comments
 (0)