Repository navigation
Restore dev-certs diagnostics in Native AOT tools - #69534
Merged
akoeplinger merged 1 commit intoSep 28, 2026
Merged
Conversation
Enable EventSource support so existing certificate diagnostics reach the console. Scope the native-library warning suppression to the single-runtime aggregate and cover verbose output through its published launcher. Co-authored-by: Copilot <[email protected]> Copilot-Session: ff59a411-cb14-4088-a4a1-9e9c7c4901a4
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Windows and Linux native execution were not validated locally; final human review is warranted.
Review effort: Lite
Findings: None
What changed in this PR
Restores dotnet dev-certs diagnostics in Native AOT builds.
Changes:
- Re-enables EventSource support.
- Suppresses the expected shared-library warning.
- Adds regression coverage for verbose diagnostics.
| File | Summary |
|---|---|
src/Tools/NativeAot/test/NativeAotToolScenarioTests.cs |
Verifies verbose certificate diagnostics. |
src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj |
Suppresses the Native AOT EventSource warning. |
src/Tools/NativeAot/AspNetCoreTools.NativeAot.props |
Enables EventSource support. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
Author
Member
|
Seems reasonable to take this, worth the size increase. |
Member
Author
|
/ba-g unrelated QUIC test failures |
javiercn
approved these changes
Sep 28, 2026
Member
Author
|
/backport to release/11.0 |
Contributor
|
Started backporting to |
5 of 11 tasks
This was referenced Sep 29, 2026
wtgodbe
pushed a commit
that referenced
this pull request
Oct 1, 2026
Enable EventSource support so existing certificate diagnostics reach the console. Scope the native-library warning suppression to the single-runtime aggregate and cover verbose output through its published launcher. Co-authored-by: Alexander Köplinger <[email protected]> Co-authored-by: Copilot <[email protected]> Copilot-Session: ff59a411-cb14-4088-a4a1-9e9c7c4901a4
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Restore existing
dotnet dev-certsdiagnostics in Native AOT builds (added in dotnet/dotnet#6720).Certificate diagnostics, including the underlying exception and
security importfailure output, are delivered throughCertificateManagerEventSourceand an in-processReporterEventListener. The shared Native AOT settings disable EventSource support, so these events aren't displayed, not even with--verbose. The final success/error messages still appear because they are written directly to the console.Reenable EventSource support to fix that. This adds about 1MB to the size of the bundle library or standalone tool.
Verbose versus normal output
Failure details remain verbose-only: they use
Error, while normal mode admits onlyCritical(none currently declared) andLogAlways.The latter includes Linux/OpenSSL guidance to set or extend
SSL_CERT_DIR(events 110, 111, and 114), so enabling EventSource also restores non-verbose guidance.Validation
HOMEwith no login keychain, without modifying the real user keychain. Compared Release native aggregates built from the same source with EventSource disabled/enabled, with and without--verbose. All four runs exited with code 2 and printed the generic saving error. Only the enabled, verbose run also printed event 56 (security importfailure output) and event 22 (the save exception). Both non-verbose runs printed only the generic error.