Skip to content

Comments

Enable EnablePackageValidation for all src packages with 0.9.0-preview.1 baseline#1330

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/enable-package-validation
Draft

Enable EnablePackageValidation for all src packages with 0.9.0-preview.1 baseline#1330
Copilot wants to merge 2 commits intomainfrom
copilot/enable-package-validation

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Opts into EnablePackageValidation so the build catches API breaking changes automatically against the published 0.9.0-preview.1 baseline.

Changes

  • src/Directory.Build.props: Adds EnablePackageValidation=true and PackageValidationBaselineVersion=0.9.0-preview.1 — applies to all three packable projects (ModelContextProtocol.Core, ModelContextProtocol, ModelContextProtocol.AspNetCore)
  • src/ModelContextProtocol.Core/CompatibilitySuppressions.xml: Suppresses intentional breaking changes already made post-0.9.0-preview.1 (property type changes on ProtectedResourceMetadata, DynamicClientRegistrationResponse, ToolResultContentBlock.Content, and ListTasksResult.Tasks). All suppressions are marked IsBaselineSuppression=true.

Any new breaking change introduced going forward will fail dotnet pack unless explicitly suppressed.

Original prompt

This section details on the original issue you should resolve

<issue_title>Opt in to EnablePackageValidation to catch breaking changes</issue_title>
<issue_description>Skills aside, we should enable the EnablePackageValidation property in the main projects so that breaking changes are caught by the build process itself. That should provide much stronger feedback to LLMs as well.

Originally posted by @eiriktsarpalis in #1328 (comment)
</issue_description>

<agent_instructions>The 0.9.0-preview.1 version should be used as the baseline to establish for package validation. Validation should be enabled for all packages produced in the src build.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…src packages

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Copilot AI changed the title [WIP] Add package validation to catch breaking changes Enable EnablePackageValidation for all src packages with 0.9.0-preview.1 baseline Feb 20, 2026
Copilot AI requested a review from jeffhandley February 20, 2026 13:42
@jeffhandley jeffhandley marked this pull request as ready for review February 20, 2026 13:45
@jeffhandley jeffhandley requested a review from ericstj February 20, 2026 13:45
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ModelContextProtocol.Protocol.ListTasksResult.get_Tasks</Target>
Copy link
Member

Choose a reason for hiding this comment

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

Is this adding suppressions for experimental APIs presumably?

<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AssemblyOriginatorKeyFile>$(RepoRoot)\Open.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<EnablePackageValidation>true</EnablePackageValidation>
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can keep this turned off until we have a final stable release.

Suggested change
<EnablePackageValidation>true</EnablePackageValidation>
<EnablePackageValidation>false</EnablePackageValidation>

<Target>M:ModelContextProtocol.Authentication.DynamicClientRegistrationResponse.get_GrantTypes</Target>
<Left>lib/net10.0/ModelContextProtocol.Core.dll</Left>
<Right>lib/net10.0/ModelContextProtocol.Core.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need any suppressions right now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because we've already made changes in main; and this caught them. But I'll wait to finalize this PR until we cut 1.0.0 stable, and clear the suppressions.

@jeffhandley jeffhandley marked this pull request as draft February 21, 2026 01:57
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.

Opt in to EnablePackageValidation to catch breaking changes

4 participants