Skip to content

Commit 5426d0c

Browse files
Support .NET 10
Add support for building and testing with .NET 10, initially using .NET 10 preview 4.
1 parent 154a6dc commit 5426d0c

File tree

16 files changed

+48
-28
lines changed

16 files changed

+48
-28
lines changed

.github/workflows/Component.BuildTest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
required: false
2525
type: string
2626
tfm-list:
27-
default: '[ "net462", "net8.0", "net9.0" ]'
27+
default: '[ "net462", "net8.0", "net9.0", "net10.0" ]'
2828
required: false
2929
type: string
3030

@@ -42,7 +42,7 @@ jobs:
4242
- os: ubuntu-22.04-arm
4343
version: net462
4444
- os: ubuntu-22.04-arm
45-
version: net8.0
45+
version: net10.0
4646

4747
runs-on: ${{ matrix.os }}
4848
steps:

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
strategy:
112112
fail-fast: false
113113
matrix:
114-
version: [ net8.0, net9.0 ]
114+
version: [ net8.0, net9.0, net10.0 ]
115115
steps:
116116
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117117
- name: Run OTLP Exporter docker compose
@@ -129,7 +129,7 @@ jobs:
129129
strategy:
130130
fail-fast: false
131131
matrix:
132-
version: [ net8.0, net9.0 ]
132+
version: [ net8.0, net9.0, net10.0 ]
133133
steps:
134134
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
135135
- name: Run W3C Trace Context docker compose

.github/workflows/concurrency-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
1616
matrix:
1717
os: [ windows-latest, ubuntu-22.04 ]
18-
version: [ net8.0 ]
18+
version: [ net8.0, net10.0 ]
1919
project: [ OpenTelemetry.Tests, OpenTelemetry.Api.Tests ]
2020

2121
runs-on: ${{ matrix.os }}

.github/workflows/verifyaotcompat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
1616
matrix:
1717
os: [ ubuntu-22.04, windows-latest ]
18-
version: [ net8.0, net9.0 ]
18+
version: [ net8.0, net9.0, net10.0 ]
1919

2020
runs-on: ${{ matrix.os }}
2121
steps:

Directory.Packages.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
possible and only deviate (use a specific version) when a package has a
1010
more specific patch which must be reference directly.
1111
-->
12-
<LatestRuntimeOutOfBandVer>9.0.0</LatestRuntimeOutOfBandVer>
12+
<LatestRuntimeOutOfBandVer>10.0.0-preview.4.25258.110</LatestRuntimeOutOfBandVer>
1313

1414
<!-- Mitigate https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485. -->
1515
<SystemTextEncodingsWebOutOfBandMinimumCoreAppVer>8.0.0</SystemTextEncodingsWebOutOfBandMinimumCoreAppVer>
@@ -125,4 +125,8 @@
125125
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
126126
</ItemGroup>
127127

128+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
129+
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="10.0.0-preview.4.25258.110" />
130+
</ItemGroup>
131+
128132
</Project>

OpenTelemetry.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E
3333
build\docfx.cmd = build\docfx.cmd
3434
build\docker-compose.net8.0.yml = build\docker-compose.net8.0.yml
3535
build\docker-compose.net9.0.yml = build\docker-compose.net9.0.yml
36+
build\docker-compose.net10.0.yml = build\docker-compose.net10.0.yml
3637
build\GlobalAttrExclusions.txt = build\GlobalAttrExclusions.txt
3738
build\opentelemetry-icon-color.png = build\opentelemetry-icon-color.png
3839
build\OpenTelemetry.prod.loose.ruleset = build\OpenTelemetry.prod.loose.ruleset

build/Common.nonprod.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<PropertyGroup>
11-
<DefaultTargetFrameworkForExampleApps>net9.0</DefaultTargetFrameworkForExampleApps>
11+
<DefaultTargetFrameworkForExampleApps>net10.0</DefaultTargetFrameworkForExampleApps>
1212
</PropertyGroup>
1313

1414
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Tests'))">

build/Common.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
<NetFrameworkSupportedVersions>net481;net48;net472;net471;net47;net462</NetFrameworkSupportedVersions>
2929

3030
<!-- production TFMs -->
31-
<TargetFrameworksForLibraries>net9.0;net8.0;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksForLibraries>
32-
<TargetFrameworksForLibrariesExtended>net9.0;net8.0;netstandard2.1;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksForLibrariesExtended>
33-
<TargetFrameworksForPrometheusAspNetCore>net9.0;net8.0</TargetFrameworksForPrometheusAspNetCore>
31+
<TargetFrameworksForLibraries>net10.0;net9.0;net8.0;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksForLibraries>
32+
<TargetFrameworksForLibrariesExtended>net10.0;net9.0;net8.0;netstandard2.1;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksForLibrariesExtended>
33+
<TargetFrameworksForPrometheusAspNetCore>net10.0;net9.0;net8.0</TargetFrameworksForPrometheusAspNetCore>
3434
<TargetFrameworksRequiringSystemTextJsonDirectReference>net8.0;netstandard2.1;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksRequiringSystemTextJsonDirectReference>
3535

3636
<!-- non-production TFMs -->
37-
<TargetFrameworksForAspNetCoreTests>net9.0;net8.0</TargetFrameworksForAspNetCoreTests>
38-
<TargetFrameworksForAotCompatibilityTests>net9.0;net8.0</TargetFrameworksForAotCompatibilityTests>
39-
<TargetFrameworksForDocs>net9.0;net8.0</TargetFrameworksForDocs>
37+
<TargetFrameworksForAspNetCoreTests>net10.0;net9.0;net8.0</TargetFrameworksForAspNetCoreTests>
38+
<TargetFrameworksForAotCompatibilityTests>net10.0;net9.0;net8.0</TargetFrameworksForAotCompatibilityTests>
39+
<TargetFrameworksForDocs>net10.0;net9.0;net8.0</TargetFrameworksForDocs>
4040
<TargetFrameworksForDocs Condition="$(OS) == 'Windows_NT' And '$(UsingMicrosoftNETSdkWeb)' != 'True'">
4141
$(TargetFrameworksForDocs);$(NetFrameworkSupportedVersions)
4242
</TargetFrameworksForDocs>
43-
<TargetFrameworksForTests>net9.0;net8.0</TargetFrameworksForTests>
43+
<TargetFrameworksForTests>net10.0;net9.0;net8.0</TargetFrameworksForTests>
4444
<TargetFrameworksForTests Condition="$(OS) == 'Windows_NT'">
4545
$(TargetFrameworksForTests);$(NetFrameworkMinimumSupportedVersion)
4646
</TargetFrameworksForTests>

build/docker-compose.net10.0.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3.7'
2+
3+
services:
4+
tests:
5+
build:
6+
args:
7+
PUBLISH_FRAMEWORK: net10.0
8+
TEST_SDK_VERSION: "10.0"
9+
BUILD_SDK_VERSION: "10.0"

examples/MicroserviceExample/WebApi/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
ARG SDK_VERSION=9.0
1+
ARG SDK_VERSION=10.0
22
FROM mcr.microsoft.com/dotnet/sdk:8.0.411@sha256:e6a5a8d884609907fa8d468b927df765967f6b22f890ce92bd3ae614ca4ae87e AS dotnet-sdk-8.0
33
FROM mcr.microsoft.com/dotnet/sdk:9.0.300@sha256:c5b188baf837b0180a14f988815b9cc7a55b836dd6cbe1b6e6523cf3098faaa8 AS dotnet-sdk-9.0
4+
FROM mcr.microsoft.com/dotnet/sdk:10.0.100-preview.4@sha256:0c90f5c8dfb1d4a666116cf27ea75bb081e800c6f6228a5c4a33ff32d727e254 AS dotnet-sdk-10.0
45

56
FROM dotnet-sdk-${SDK_VERSION} AS build
67
ARG PUBLISH_CONFIGURATION=Release
7-
ARG PUBLISH_FRAMEWORK=net9.0
8+
ARG PUBLISH_FRAMEWORK=net10.0
89
WORKDIR /app
910
COPY . ./
1011
RUN dotnet publish ./examples/MicroserviceExample/WebApi -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /out -p:IntegrationBuild=true
1112

1213
FROM mcr.microsoft.com/dotnet/aspnet:8.0.17@sha256:d5c0d91bc8fe887684b97d5409056270ed78cd23a5123436e842a8114a64d584 AS dotnet-aspnet-8.0
1314
FROM mcr.microsoft.com/dotnet/aspnet:9.0.5@sha256:d5507d8292fb2469ec0b9913f3cd4bb8d5a014bd6dc00c33fd4c4e7310229f07 AS dotnet-aspnet-9.0
15+
FROM mcr.microsoft.com/dotnet/aspnet:10.0.0-preview.4@sha256:898d64af8cb7d440f82432a42dfcdf7d6e87feccc4225c46736cbc3976cb9303 AS dotnet-aspnet-10.0
1416

1517
FROM dotnet-aspnet-${SDK_VERSION} AS runtime
1618
WORKDIR /app

0 commit comments

Comments
 (0)