diff --git a/.azure-pipelines/daily-ci-build.yml b/.azure-pipelines/daily-ci-build.yml index 9929aa64964..012a199afc4 100644 --- a/.azure-pipelines/daily-ci-build.yml +++ b/.azure-pipelines/daily-ci-build.yml @@ -41,16 +41,16 @@ extends: submodules: recursive - task: UseDotNet@2 - displayName: Set up .NET 8 + displayName: Set up .NET 10 inputs: packageType: 'sdk' - version: 8.x + version: 10.x - task: UseDotNet@2 - displayName: Set up .NET 10 + displayName: Set up .NET 11 inputs: packageType: 'sdk' - version: 10.x + version: 11.x - task: NuGetAuthenticate@1 displayName: Authenticate to Azure Artifacts @@ -81,14 +81,14 @@ extends: displayName: Build SDK (netstandard2.1) workingDirectory: $(Build.SourcesDirectory) - - script: dotnet build src\Microsoft.Graph\Microsoft.Graph.Beta.csproj --no-restore -f net8.0 - displayName: Build SDK (net8.0) - workingDirectory: $(Build.SourcesDirectory) - - script: dotnet build src\Microsoft.Graph\Microsoft.Graph.Beta.csproj --no-restore -f net10.0 displayName: Build SDK (net10.0) workingDirectory: $(Build.SourcesDirectory) + - script: dotnet build src\Microsoft.Graph\Microsoft.Graph.Beta.csproj --no-restore -f net11.0 + displayName: Build SDK (net11.0) + workingDirectory: $(Build.SourcesDirectory) + - script: dotnet build tests\Microsoft.Graph.DotnetCore.Test\Microsoft.Graph.DotnetCore.Test.csproj --no-restore displayName: Build test project workingDirectory: $(Build.SourcesDirectory) diff --git a/.github/workflows/validatePullRequest.yml b/.github/workflows/validatePullRequest.yml index 88c1c55d8e1..aaf88664449 100644 --- a/.github/workflows/validatePullRequest.yml +++ b/.github/workflows/validatePullRequest.yml @@ -24,8 +24,8 @@ jobs: uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0 with: dotnet-version: | - 8.x 10.x + 11.x - name: Restore dependencies run: dotnet restore ${{ env.solutionName }} # Build each TFM sequentially to avoid OOM kills on the runner. @@ -34,10 +34,10 @@ jobs: 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 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 for net11.0 + run: dotnet build ${{ env.projectName }} -f net11.0 --no-restore -c Release - name: Build test project run: dotnet build ${{ env.solutionName }} --no-restore -c Release - name: Test @@ -64,8 +64,8 @@ jobs: uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0 with: dotnet-version: | - 8.x 10.x + 11.x - name: Restore dependencies run: dotnet restore ${{ env.solutionName }} - name: Build for netstandard2.0 diff --git a/README.md b/README.md index 4e9e2120f04..7e832b1f431 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ The Microsoft Graph Beta .NET Client Library 4.x targets .NetStandard 2.0 and .N The Microsoft Graph Beta .NET Client Library 5.x targets .NetStandard 2.0 +The current Microsoft Graph Beta .NET Client Library targets .NET Standard 2.0, .NET Standard 2.1, .NET 10.0, and .NET 11.0. As a breaking change for .NET target framework alignment with .NET support lifecycles, it replaces the dedicated .NET 8.0 target with .NET 11.0. .NET 8 applications can still consume the retained compatible .NET Standard assets, but .NET 8 is no longer a dedicated build or test target. + ## Installation via NuGet To install the client library via NuGet: @@ -56,9 +58,10 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope If you are looking to build the library locally for the purposes of contributing code or running tests, you will need to: -- Have the .NET Core SDK (> 1.0) installed -- Run `dotnet restore` from the command line in your package directory -- Run `nuget restore` and `msbuild` from CLI or run Build from Visual Studio to restore Nuget packages and build the project +- Have the .NET 11 SDK installed, and the .NET 10 runtime to run tests for both supported .NET targets +- Run `dotnet restore Microsoft.Graph.Beta.sln` from the repository root +- Build the library one target framework at a time with `dotnet build src/Microsoft.Graph/Microsoft.Graph.Beta.csproj -f --no-restore`, using `netstandard2.0`, `netstandard2.1`, `net10.0`, and `net11.0` to avoid exhausting memory +- Run `dotnet test tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj` to run tests for .NET 10.0 and .NET 11.0 > Due to long file names you may need to run `git config --system core.longpaths true` before cloning the repo to your system. diff --git a/pipelines/ci-build.yml b/pipelines/ci-build.yml index 0ab4803c6ab..cb81cd19e69 100644 --- a/pipelines/ci-build.yml +++ b/pipelines/ci-build.yml @@ -47,15 +47,15 @@ extends: displayName: 'Enable long paths in git' - checkout: self - task: UseDotNet@2 - displayName: 'Use .NET 8.x sdk' + displayName: 'Use .NET 10.x sdk' inputs: packageType: sdk - version: 8.x + version: 10.x - task: UseDotNet@2 - displayName: 'Use .NET 10.x sdk' + displayName: 'Use .NET 11.x sdk' inputs: packageType: sdk - version: 10.x + version: 11.x - task: UseDotNet@2 displayName: 'Use .NET 6.x (for code signing tasks)' inputs: @@ -123,15 +123,15 @@ extends: 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 net8.0' + displayName: 'dotnet build net10.0' inputs: projects: '$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj' - arguments: '-c $(BuildConfiguration) --no-incremental -f net8.0 --no-restore' + arguments: '-c $(BuildConfiguration) --no-incremental -f net10.0 --no-restore' - task: DotNetCoreCLI@2 - displayName: 'dotnet build net10.0' + displayName: 'dotnet build net11.0' inputs: projects: '$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj' - arguments: '-c $(BuildConfiguration) --no-incremental -f net10.0 --no-restore' + arguments: '-c $(BuildConfiguration) --no-incremental -f net11.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 79ec1466857..8cf55e429f6 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;net8.0;net10.0 + netstandard2.0;netstandard2.1;net10.0;net11.0 latest false Microsoft.Graph.Beta 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 2b7d56950a0..2116b064e15 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;net10.0 + net10.0;net11.0 false Microsoft.Graph.DotnetCore.Test true