Summary
Add a global.json file to the .NET project under src/500-application/500-basic-inference/services/pipeline/ (and any other .NET projects in this repo that lack one) to pin a minimum .NET SDK version. The repo currently has no global.json but contains .NET 9.0 projects:
src/500-application/500-basic-inference/services/pipeline/src/InferencePipeline/InferencePipeline.csproj
src/500-application/500-basic-inference/services/pipeline/src/InferencePipeline.Tests/InferencePipeline.Tests.csproj
Why
- Security: Pin to a minimum .NET SDK version that includes fixes for high/critical security advisories. Older SDKs are exposed to known CVEs (RCE, EoP, DoS). See the .NET 9.0 CVE list for details.
- Version consistency: All developers and build systems use the same SDK version, eliminating "works on my machine" issues.
- Build reproducibility: Guarantees consistent builds regardless of environment.
- Explicit dependencies: Makes SDK requirements visible and aids maintenance planning.
- Controlled upgrades: Enables intentional SDK upgrades when the team is ready, rather than implicit upgrades based on whatever is installed.
Proposed change
Add a global.json at an appropriate scope (project root or repo root) selecting a current, supported .NET 9.0 SDK with security fixes, e.g.:
{
"sdk": {
"version": "9.0.×××",
"rollForward": "latestFeature"
}
}
The exact version should be the latest patched 9.0.x SDK at implementation time.
Acceptance criteria
Pipeline note
If a build fails due to the SDK version requirement, install the required SDK in Azure Pipelines:
- task: UseDotNet@2
inputs:
useGlobalJson: true
Summary
Add a
global.jsonfile to the .NET project undersrc/500-application/500-basic-inference/services/pipeline/(and any other .NET projects in this repo that lack one) to pin a minimum .NET SDK version. The repo currently has noglobal.jsonbut contains .NET 9.0 projects:src/500-application/500-basic-inference/services/pipeline/src/InferencePipeline/InferencePipeline.csprojsrc/500-application/500-basic-inference/services/pipeline/src/InferencePipeline.Tests/InferencePipeline.Tests.csprojWhy
Proposed change
Add a
global.jsonat an appropriate scope (project root or repo root) selecting a current, supported .NET 9.0 SDK with security fixes, e.g.:{ "sdk": { "version": "9.0.×××", "rollForward": "latestFeature" } }The exact version should be the latest patched 9.0.x SDK at implementation time.
Acceptance criteria
global.jsonadded covering all .NET projects in the repodotnet buildsucceeds with the pinned SDKUseDotNet@2withuseGlobalJson: trueif required)Pipeline note
If a build fails due to the SDK version requirement, install the required SDK in Azure Pipelines: