-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Workaround REVOCATION in .NET 10 by setting DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT #30503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… variable Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
81f4bbf to
3ce9410
Compare
|
|
try again |
✅ Build test completed successfully! The environment variable
The fix successfully prevents the .NET 10 certificate revocation check issues during builds and package restoration. Commit: 3ce9410 |
|
✅ Tested Test Results:
The manual environment variable setting works correctly for both restore and build operations when called directly with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT environment variable to ensure builds and restores behave as they did prior to .NET 10’s default revocation-check change.
- Injects the workaround into Cake’s process-spawning and current-process environment setup
- Ensures the same variable is exported in GitHub Actions workflows
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/cake/dotnet.cake | Adds DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT=true to both GetDotNetEnvironmentVariables() and SetDotNetEnvironmentVariables() |
| .github/workflows/copilot-setup-steps.yml | Exports DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT=true into the workflow environment |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
can you teset this one more time? |
✅ Tested Test Results:
The environment variable successfully prevents certificate revocation check failures from blocking the build process. When set, the build can continue despite some feed timeouts, whereas without it builds are more likely to fail on SSL certificate issues. Commit: 3ce9410 |
|
/backport to main |
|
Started backporting to main: https://github.com/dotnet/maui/actions/runs/16169352105 |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Summary
Adds the
DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT=trueenvironment variable to the build system to prevent SSL certificate revocation check issues in .NET 10 builds and restores.Background
In .NET 10, the default certificate revocation check mode changed from
NoChecktoOnline, which can cause SSL/TLS connectivity issues during builds and package restoration when certificate revocation checking fails or times out. This is documented in the .NET 10 breaking change documentation.The recommended workaround is to set the
DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULTenvironment variable totrueto restore the previous behavior.Changes
Modified
eng/cake/dotnet.caketo include the environment variable in both:GetDotNetEnvironmentVariables()- for environment variable dictionaries passed to processesSetDotNetEnvironmentVariables()- for setting environment variables in the current process+ envVariables.Add("DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT", "true");+ SetEnvironmentVariable("DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT", "true");Testing
Microsoft.Maui.BuildTasks.slnfwithout issuesDOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT = 'true'Impact
This change ensures forward compatibility when upgrading to .NET 10 by preventing SSL certificate revocation check failures during builds and package restoration. The environment variable is ignored by earlier .NET versions, making this a safe preparation for the future .NET 10 upgrade.
Fixes #30502.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.