Skip to content

Conversation

@stephentoub
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a 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 updates the .NET package dependencies from version 9.x to 10.x, removes the temporary CustomizableJsonStringEnumConverter workaround (replaced by built-in .NET 10 support), and adds comprehensive tests for unknown property handling to ensure forward compatibility with future protocol versions.

Key Changes

  • Updated package versions to .NET 10.0.0 for System.* and Microsoft.Extensions.* packages
  • Removed CustomizableJsonStringEnumConverter and replaced all usages with .NET's built-in JsonStringEnumConverter<T>
  • Removed conditional compilation directives for .NET 9+ features (histogram bucket boundaries)

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Directory.Packages.props Updated package versions from 9.x to 10.x; reorganized package references by framework with clearer grouping
src/ModelContextProtocol.Core/CustomizableJsonStringEnumConverter.cs Removed temporary workaround file (125 lines deleted) as functionality is now built into .NET 10
src/ModelContextProtocol.Core/McpJsonUtilities.cs Updated enum converter registration from CustomizableJsonStringEnumConverter to JsonStringEnumConverter
src/ModelContextProtocol.Core/Protocol/Role.cs Updated JsonConverter attribute to use built-in JsonStringEnumConverter
src/ModelContextProtocol.Core/Protocol/LoggingLevel.cs Updated JsonConverter attribute to use built-in JsonStringEnumConverter
src/ModelContextProtocol.Core/Protocol/ContextInclusion.cs Updated JsonConverter attribute to use built-in JsonStringEnumConverter
src/ModelContextProtocol.Core/Diagnostics.cs Removed NET9_0_OR_GREATER preprocessor directives around histogram bucket boundaries
tests/ModelContextProtocol.Tests/Protocol/ElicitationTypedTests.cs Updated test enum to use built-in JsonStringEnumConverter
tests/ModelContextProtocol.Tests/Protocol/UnknownPropertiesTests.cs New test file (258 lines) validating that JSON deserializers skip unknown properties for forward compatibility

Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

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

Thanks.

@stephentoub stephentoub merged commit b993ae0 into modelcontextprotocol:main Nov 12, 2025
13 checks passed
@stephentoub stephentoub deleted the update10 branch November 12, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants