Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 5, 2025

This PR adds comprehensive breaking change documentation for .NET 10 Preview 7, covering the preservation of null values in configuration binding. Previously, the configuration binder treated null values as missing values and skipped binding them. The JSON configuration provider also converted null values to empty strings, causing confusion for developers.

Changes Made

New Documentation

  • docs/core/compatibility/extensions/10.0/configuration-null-values-preserved.md - Complete breaking change documentation following the established template

Updated Navigation

  • docs/core/compatibility/toc.yml - Added TOC entry for the new breaking change
  • docs/core/compatibility/10.0.md - Added entry to the Extensions section table

Key Features

The documentation includes:

  • Clear before/after examples showing how the behavior changed for both JSON and in-memory configuration providers
  • Validated C# code samples that compile successfully and demonstrate the breaking change
  • Proper API references using xref format for affected configuration binding methods
  • Migration guidance for users who prefer the previous behavior
  • Correct categorization as a behavioral change affecting .NET 10 Preview 7

Example of the Change

Previous behavior (null converted to empty string):

StringProperty: '', intProperty: 123
Array1: '', ''

New behavior (null values preserved):

StringProperty: 'null', intProperty: null
Array1: 'null', 'null'

This change makes configuration binding more intuitive and consistent with developer expectations when working with explicit null values in configuration.

Fixes #46890.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/10.0.md Breaking changes in .NET 10
docs/core/compatibility/extensions/10.0/configuration-null-values-preserved.md Null values preserved in configuration
docs/core/compatibility/toc.yml docs/core/compatibility/toc

@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Aug 5, 2025
@Copilot Copilot AI changed the title [WIP] [Breaking change]: Preserving Null Values in Configuration Add breaking change documentation for preserving null values in configuration Aug 5, 2025
@Copilot Copilot AI requested a review from gewarren August 5, 2025 23:49
Copilot finished work on behalf of gewarren August 5, 2025 23:49
@gewarren gewarren marked this pull request as ready for review August 7, 2025 20:37
@gewarren gewarren requested a review from a team as a code owner August 7, 2025 20:37
@gewarren gewarren requested review from tarekgh and a team August 7, 2025 21:48
Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@gewarren gewarren enabled auto-merge (squash) August 7, 2025 22:14
@gewarren gewarren merged commit 99ce071 into main Aug 7, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-46890 branch August 7, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Breaking change]: Preserving Null Values in Configuration
3 participants