CI/CD deployment failure in Optimizely DXP Passportal. .NET 10 and GitHub Runner Compatibility
.NET 10 and GitHub Runner Compatibility
With the release of .NET 10, the windows-latest and ubuntu-latest GitHub Actions runners may use the latest installed .NET SDK by default.
As a result, if your application is built using a different SDK version and no SDK version is explicitly specified, the build and deployment process may use the latest SDK available on the runner. This can lead to build failures, deployment issues, or the website failing to start after deployment.
To avoid this issue, define the required SDK version in a global.json file at the root of your repository. This ensures that the build pipeline consistently uses the intended .NET SDK version regardless of updates to the GitHub-hosted runners.
Example:
{
"sdk": {
"version": "8.0.100"
}
}
By pinning the SDK version in global.json, you can ensure predictable builds and deployments across different environments and runner updates.
Comments