Update to .NET 10.x packages#957
Merged
stephentoub merged 1 commit intomodelcontextprotocol:mainfrom Nov 12, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
CustomizableJsonStringEnumConverterand replaced all usages with .NET's built-inJsonStringEnumConverter<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 |
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.
No description provided.