diff --git a/.github/workflows/validatePullRequest.yml b/.github/workflows/validatePullRequest.yml
index 73e2d287a3b3..5507d0e7a15e 100644
--- a/.github/workflows/validatePullRequest.yml
+++ b/.github/workflows/validatePullRequest.yml
@@ -23,16 +23,22 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5.2.0
with:
- dotnet-version: 8.x
+ dotnet-version: |
+ 8.x
+ 10.x
- name: Restore dependencies
run: dotnet restore ${{ env.solutionName }}
+ # Build each TFM sequentially to avoid OOM kills on the runner.
+ # Building all TFMs in parallel exhausts memory on standard GitHub Actions runners (exit code 137).
- name: Build for netstandard2.0
run: dotnet build ${{ env.projectName }} -f netstandard2.0 --no-restore -c Release
- name: Build for netstandard2.1
run: dotnet build ${{ env.projectName }} -f netstandard2.1 --no-restore -c Release
- - name: Build for net5.0
- run: dotnet build ${{ env.projectName }} -f net5.0 --no-restore -c Release
- - name: Build
+ - name: Build for net8.0
+ run: dotnet build ${{ env.projectName }} -f net8.0 --no-restore -c Release
+ - name: Build for net10.0
+ run: dotnet build ${{ env.projectName }} -f net10.0 --no-restore -c Release
+ - name: Build test project
run: dotnet build ${{ env.solutionName }} --no-restore -c Release
- name: Test
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Release /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
@@ -54,6 +60,12 @@ jobs:
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v5.2.0
+ with:
+ dotnet-version: |
+ 8.x
+ 10.x
- name: Restore dependencies
run: dotnet restore ${{ env.solutionName }}
- name: Build for netstandard2.0
diff --git a/pipelines/ci-build.yml b/pipelines/ci-build.yml
index 3d713b09b88a..c95744f5b325 100644
--- a/pipelines/ci-build.yml
+++ b/pipelines/ci-build.yml
@@ -51,6 +51,11 @@ extends:
inputs:
packageType: sdk
version: 8.x
+ - task: UseDotNet@2
+ displayName: 'Use .NET 10.x sdk'
+ inputs:
+ packageType: sdk
+ version: 10.x
- task: UseDotNet@2
displayName: 'Use .NET 6.x (for code signing tasks)'
inputs:
@@ -89,23 +94,28 @@ extends:
Write-Host "Updated the .csproj files so that we can sign the built assemblies."
workingDirectory: src
displayName: 'Set project ready to sign'
+ # Build each TFM sequentially to avoid OOM kills on the build agent.
+ # Building all TFMs in parallel exhausts memory on standard runners (exit code 137).
- task: DotNetCoreCLI@2
displayName: 'dotnet build netstandard2.0'
inputs:
projects: '$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj'
arguments: '-c $(BuildConfiguration) --no-incremental -f netstandard2.0 --no-restore'
-
- task: DotNetCoreCLI@2
displayName: 'dotnet build netstandard2.1'
inputs:
projects: '$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj'
arguments: '-c $(BuildConfiguration) --no-incremental -f netstandard2.1 --no-restore'
-
- task: DotNetCoreCLI@2
- displayName: 'dotnet build net5.0'
+ displayName: 'dotnet build net8.0'
+ inputs:
+ projects: '$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj'
+ arguments: '-c $(BuildConfiguration) --no-incremental -f net8.0 --no-restore'
+ - task: DotNetCoreCLI@2
+ displayName: 'dotnet build net10.0'
inputs:
projects: '$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj'
- arguments: '-c $(BuildConfiguration) --no-incremental -f net5.0 --no-restore'
+ arguments: '-c $(BuildConfiguration) --no-incremental -f net10.0 --no-restore'
- task: DotNetCoreCLI@2
displayName: 'dotnet build test project'
inputs:
diff --git a/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj b/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj
index 95c408937572..83b3ef5424f2 100644
--- a/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj
+++ b/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj
@@ -5,7 +5,7 @@
© Microsoft Corporation. All rights reserved.
Microsoft Graph Beta Client Library
Microsoft
- netstandard2.0;netstandard2.1;net5.0
+ netstandard2.0;netstandard2.1;net8.0;net10.0
latest
false
Microsoft.Graph.Beta
@@ -86,7 +86,8 @@
-
+
+
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj b/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj
index d4f41f5c4fcf..7e7599e07958 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net8.0;net10.0
false
Microsoft.Graph.DotnetCore.Test
true