Skip to content

Honor content type overrides - #1016

Merged
dtivel merged 5 commits into
dotnet:mainfrom
kennethr127:kennethr127/honor-content-type-overrides
Aug 18, 2026
Merged

dtivel merged 5 commits into
dotnet:mainfrom
kennethr127:kennethr127/honor-content-type-overrides

Conversation

@kennethr127

@kennethr127 kennethr127 commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Currently, the Overrides in the [Content_Types].xml file in the package are not being honored during signing. This update addresses that issue by checking for any overrides when retrieving the ContentType.

Fixes #1015

@kennethr127
kennethr127 force-pushed the kennethr127/honor-content-type-overrides branch from db8f4bc to 6cd7611 Compare May 6, 2026 21:56
@kennethr127

This comment was marked as resolved.

@kennethr127
kennethr127 marked this pull request as ready for review May 6, 2026 22:24
@kennethr127
kennethr127 requested a review from a team as a code owner May 6, 2026 22:24

@dtivel dtivel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kennethr127, thank you for contributing this fix!

I’m requesting a few focused changes before merging:

  • Avoid stripping trailing slashes when matching override part names, since that can make malformed names match valid parts.
  • Make the Override and Default modes explicit when selecting content types.
  • Simplify the test to open the source VSIX once in read-only mode.
  • Use separate NotNull and Equal assertions for clearer failures.

With those changes, this should be ready to merge.

@kennethr127

Copy link
Copy Markdown
Contributor Author

@dtivel Thank you reviewing this change and leaving feedback! I just pushed an update that should address all your feedback. Please let me know if I missed anything.

@dtivel dtivel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the updates, @kennethr127!

@kennethr127
kennethr127 requested a review from dtivel August 17, 2026 18:51
@dtivel

dtivel commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

@kennethr127, thanks for the changes. Can you rebase on latest main branch?

kennethr127 and others added 5 commits August 18, 2026 13:26
…pes calls to make the intended precedence explicit. Removed unneeded ShadowCopyPackage calls in unit test, made Asserts less ambiguous, added and some additional asserts. Added a new test to validate that content types are not changes if the Override is invalid.
Co-authored-by: Damon Tivel <dtivel@microsoft.com>
@kennethr127
kennethr127 force-pushed the kennethr127/honor-content-type-overrides branch from 6657428 to 2894d4c Compare August 18, 2026 17:27

@dtivel dtivel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks, @kennethr127!

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.

Content type overrides in [Content_Types].xml are not honored

4 participants