Skip to content

Conversation

@paulmedynski
Copy link
Contributor

Description

  • Added global.json to restrict our SDK to the single supported version, currently 9.0.
  • Using global.json to install .NET SDKs everywhere except when we may need ARM64.
  • Removed unnecessary installation of .NET runtimes where they aren't needed.

Testing

PR, CI, and Official pipelines will validate.

Copilot AI review requested due to automatic review settings November 21, 2025 15:22
Copilot finished reviewing on behalf of paulmedynski November 21, 2025 15:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces global.json to standardize the .NET SDK version (9.0.0) across the project and migrates pipeline files to use UseDotNet@2 with useGlobalJson: true instead of hardcoded version numbers or the ensure-dotnet-version.yml template. The changes simplify SDK installation, remove unnecessary runtime installations in build-only scenarios, and reduce redundant .NET Framework test targets in the stress tests.

Key changes:

  • Added global.json specifying .NET 9.0 SDK with rollForward: "feature" policy
  • Updated 6 pipeline files to use UseDotNet@2 with useGlobalJson: true
  • Removed installation of .NET 8.x runtime in build-only scenarios where tests aren't run
  • Reduced stress test .NET Framework targets from 6 versions to just net462

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
global.json New file specifying .NET 9.0.0 SDK requirement with feature rollforward and no prerelease versions
eng/pipelines/steps/compound-build-akv-step.yml Migrated from hardcoded SDK/runtime installation to global.json; removed unnecessary .NET 8.x runtime
eng/pipelines/stages/stress-tests-ci-stage.yml Reduced .NET Framework test targets from 6 versions to just net462
eng/pipelines/jobs/stress-tests-ci-job.yml Updated to use global.json for SDK installation and changed .NET 8 runtime from '8.x' to '8.0'
eng/pipelines/dotnet-sqlclient-ci-core.yml Added net9.0 to x86 test target frameworks with explanatory comments
eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml Migrated to global.json; removed unnecessary .NET 8.x runtime installation
eng/pipelines/common/templates/jobs/ci-run-tests-job.yml Simplified x86 SDK/runtime installation using global.json and added .NET 8.0 runtime for tests
eng/pipelines/common/templates/jobs/ci-code-coverage-job.yml Replaced ensure-dotnet-version template with UseDotNet@2 using global.json

Copy link
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentary for reviewers.

parameters:
packageType: 'sdk'
version: '10.0'
# Install whichever .NET SDKs are specified in our global.json.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code coverage only runs on Windows x64, so we don't need the special ensure-dotnet.version template here.

packageType: sdk
version: '9.x'

- task: UseDotNet@2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a .NET 8 runtime to build things. We would only need it to run tests, which doesn't happen as part of this pipeline tree.

packageType: 'sdk'
version: '9.x'

- task: UseDotNet@2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a .NET 8 runtime to build things. We would only need it to run tests, which doesn't happen as part of this pipeline tree.

global.json Outdated
"sdk":
{
// We currently require the .NET 9 SDK to build and test the project.
"version": "9.0.0",
Copy link
Contributor Author

@paulmedynski paulmedynski Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@priyankatiwari08 - You will need to set this to 10.0.100 in your PR.

Copilot AI review requested due to automatic review settings November 21, 2025 17:44
Copilot finished reviewing on behalf of paulmedynski November 21, 2025 17:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

eng/pipelines/jobs/stress-tests-ci-job.yml:146

  • With the stress tests now targeting net9.0 (as specified in netTestRuntimes parameter which defaults to [net8.0, net9.0]), the .NET 9.0 runtime should also be installed. Consider adding:
# Install the .NET 9.0 runtime to run tests that target it.
- task: UseDotNet@2
  displayName: Install .NET 9.0 Runtime
  inputs:
    packageType: runtime
    version: 9.x
  # Install the .NET 8.0 runtime to run tests that target it.
  - task: UseDotNet@2
    displayName: Install .NET 8.0 Runtime
    inputs:
      packageType: runtime
      version: 8.x

Copilot AI review requested due to automatic review settings November 24, 2025 12:29
Copilot finished reviewing on behalf of paulmedynski November 24, 2025 12:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings November 24, 2025 13:59
Copilot finished reviewing on behalf of paulmedynski November 24, 2025 14:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings November 24, 2025 16:17
Copilot finished reviewing on behalf of paulmedynski November 24, 2025 16:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings November 25, 2025 11:51
Copilot finished reviewing on behalf of paulmedynski November 25, 2025 11:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 16 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 25, 2025 14:23
Copilot finished reviewing on behalf of paulmedynski November 25, 2025 14:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 26, 2025 14:24
Copilot finished reviewing on behalf of paulmedynski November 26, 2025 14:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 26, 2025 19:06
Copilot finished reviewing on behalf of paulmedynski November 26, 2025 19:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 26, 2025 19:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 26, 2025 20:44
Copilot finished reviewing on behalf of paulmedynski November 26, 2025 20:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentary for reviewers.

- name: timeout
type: number

# True if this is an ARM64 job.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to detect ARM64 - we already know explicitly which agent images are ARM64 and we can simply set this flag in those cases.

downloadedNugetPath: $(Pipeline.Workspace)\${{parameters.artifactName }}
debug: ${{ parameters.debug }}

- ${{ else }}: # project
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was weird for the pre-build step to run a build. This has been moved out to the calling template, along with the installation of the SDKs and Runtimes.

- allNoDocs

steps:
- template: ./ensure-dotnet-version.yml@self
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now happens earlier in the template tree.

images: # list of images to run tests on
Win22_Sql19_x86: ADO-MMS22-SQL19 # stage display name: image name from the pool
TargetFrameworks: [net8.0] #[net462, net8.0] # list of target frameworks to run
TargetFrameworks: [net462, net8.0, net9.0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not test all of the runtimes we support?

pool: ADO-CI-PUBLIC-ARM64-1ES-EUS-POOL
images:
Win22_Azure_ARM64_Sql: ADO-WIN11-ARM64
architecture: arm64
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only agent image that is ARM64, so we can simply tell the downstream templates explicitly ratherr than trying to detect agent OS and architecture.

Copilot AI review requested due to automatic review settings November 27, 2025 13:49
Copilot finished reviewing on behalf of paulmedynski November 27, 2025 13:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings November 27, 2025 17:48
Copilot finished reviewing on behalf of paulmedynski November 27, 2025 17:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

eng/pipelines/jobs/stress-tests-ci-job.yml:145

  • The stress test job installs the .NET 8.0 runtime but not the .NET 9.0 runtime. Since the stress tests target net9.0 (as seen in stress-tests-ci-stage.yml line 57 which defaults to [net8.0, net9.0]), the .NET 9.0 runtime should also be installed.

Add a step after line 144 to install the .NET 9.0 runtime:

- task: UseDotNet@2
  displayName: Install .NET 9.0 Runtime
  inputs:
    packageType: runtime
    version: 9.x
  - task: UseDotNet@2
    displayName: Install .NET 8.0 Runtime
    inputs:
      packageType: runtime

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@priyankatiwari08 priyankatiwari08 self-assigned this Nov 28, 2025
…on, currently 9.0.

- Using global.json to install .NET SDKs everywhere except when we may need ARM64.
- Removed unnecessary installation of .NET SDKs and runtimes where they aren't needed.
- Added all target frameworks to the x86 test runs.
- Updated documentation related to SDKs.
- Removed runtime ARM64 architecture detection in favour of explicit parameters for the test jobs that use ARM64.
- Suppressing CredScan errors related to test secrets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants