-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document breaking change: Code coverage EnableDynamicNativeInstrumentation defaults to false in .NET 10 #49620
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
…veInstrumentation Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
|
@nohwnd I know you said there were some updates to make. Can you add them as suggestions in this PR? |
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
This PR adds documentation for a breaking change in .NET 10 where code coverage dynamic native instrumentation is now disabled by default. The change addresses a crash issue caused by security hardening in the runtime.
- Adds a new breaking change article documenting the default behavior change for
EnableDynamicNativeInstrumentation - Updates the table of contents to include the new article in the SDK section
- Updates the 10.0.md master list to include the breaking change entry
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md | New breaking change article documenting the default change from enabled to disabled for dynamic native instrumentation |
| docs/core/compatibility/toc.yml | Adds TOC entry for the new breaking change article in the SDK section |
| docs/core/compatibility/10.0.md | Adds table entry for the new breaking change in the SDK and MSBuild section |
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
|
done. |
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Clarified the impact of dynamic native instrumentation on process crashes and mentioned that it is disabled by default in certain scenarios. Updated recommendations for handling code coverage with native components.
.NET 10 disables dynamic native instrumentation by default when collecting code coverage via
dotnet test --collect:"Code Coverage". The change addresses process crashes caused by security hardening in the .NET 10 runtime that prevents non-standard DLL injection.Changes
docs/core/compatibility/sdk/10.0/code-coverage-dynamic-native-instrumentation.mddocumenting the behavioral changetoc.ymland10.0.mdin alphabetical orderImpact
Users collecting coverage on solutions without native components are unaffected and may see performance improvements. Users with C++ or other native projects have three mitigation options:
VSTEST_DISABLE_DYNAMICNATIVE_CODECOVERAGE_DEFAULT_SETTING=1environment variable to restore previous behaviorRe-enabling via
<EnableDynamicNativeInstrumentation>true</EnableDynamicNativeInstrumentation>in runsettings may fail with "covrun64.dll was not found" errors due to the runtime security changes.Fixes #50950
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews