Skip to content

Commit b76db67

Browse files
Support .NET 10
Add support for building and testing with .NET 10, initially using .NET 10 preview 4.
1 parent 1544659 commit b76db67

File tree

17 files changed

+49
-33
lines changed

17 files changed

+49
-33
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>
@@ -126,4 +126,8 @@
126126
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
127127
</ItemGroup>
128128

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

NuGet.config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<packageSources>
44
<clear />
55
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
6-
<add key="dotnet8" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json" />
76
</packageSources>
87

98
<!-- Define mappings by adding package patterns beneath the target source. -->
@@ -13,9 +12,6 @@
1312
<packageSource key="NuGet">
1413
<package pattern="*" />
1514
</packageSource>
16-
<packageSource key="dotnet8">
17-
<package pattern="Microsoft.CodeAnalysis.PublicApiAnalyzers" />
18-
</packageSource>
1915
</packageSourceMapping>
2016

2117
<disabledPackageSources />

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"

0 commit comments

Comments
 (0)