Skip to content

Remove MSBuildImportedProject item from the XSD - #14659

Merged
ViktorHofer merged 2 commits into
dotnet:mainfrom
drewnoakes:dev/drnoakes/remove-msbuildimportedproject-xsd
Aug 27, 2026
Merged

ViktorHofer merged 2 commits into
dotnet:mainfrom
drewnoakes:dev/drnoakes/remove-msbuildimportedproject-xsd

Conversation

@drewnoakes

Copy link
Copy Markdown
Member

Summary

Removes the MSBuildImportedProject item element from Microsoft.Build.CommonTypes.xsd.

MSBuildImportedProject items (added in #13681) are synthesized by the engine purely for tooling to consume when MSBuildProvideImportedProjects is set — they are never authored by users. Listing the item in the schema surfaces it in IntelliSense as though it were an authorable item, which is misleading.

Context

This is a follow-on from #14389, where the equivalent synthesized MSBuildItemGlob item was deliberately kept out of the XSD (only the opt-in MSBuildProvideItemGlobs property is documented there). This change brings MSBuildImportedProject in line with that decision.

Details

The MSBuildImportedProject item is synthesized by the engine solely for
tooling to consume; it is never authored by users. Listing it in the
schema surfaces it as an authorable item in IntelliSense, which is
misleading. Remove the item element while keeping the
MSBuildProvideImportedProjects property, matching the approach taken for
MSBuildItemGlob in dotnet#14389.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f3ee76d3-fd79-448e-b0db-862dc5b46c3a
Copilot AI review requested due to automatic review settings August 7, 2026 12:04
@drewnoakes
drewnoakes temporarily deployed to copilot-pat-pool August 7, 2026 12:04 — with GitHub Actions Inactive
@drewnoakes
drewnoakes temporarily deployed to copilot-pat-pool August 7, 2026 12:04 — with GitHub Actions Inactive
@drewnoakes
drewnoakes temporarily deployed to copilot-pat-pool August 7, 2026 12:05 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 MSBuild IntelliSense schema (Microsoft.Build.CommonTypes.xsd) to stop advertising the synthesized MSBuildImportedProject item type as authorable XML, aligning it with the prior decision to omit the similarly synthesized MSBuildItemGlob item from the XSD.

Changes:

  • Removed the MSBuildImportedProject <xs:element> from the XSD so it no longer appears as an authorable item in IntelliSense.
  • Kept the MSBuildProvideImportedProjects property in the XSD (still user-settable and useful for discovery).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MSBuild Expert Review

✅ 22/24 dimensions clean.

This is a well-targeted, focused change that removes the MSBuildImportedProject item element from the XSD schema, consistent with the approach taken for MSBuildItemGlob in #14389.

# Dimension Verdict
4 Test Coverage 🟡 1 NIT
18 Documentation Accuracy 🟡 1 NIT

✅ 22/24 dimensions clean.

Findings

[NIT] Test Coverage — There is no test asserting that MSBuildImportedProject is absent from the XSD file. The existing tests in ProjectInstance_ImportedProjectItems_Tests.cs verify the engine synthesizes the items correctly, but do not validate schema content. This is a very minor gap; schema tests are uncommon in this codebase and consistent with how MSBuildItemGlob (from #14389) was handled.

[NIT] Documentation Accuracy — documentation/Built-in-Properties.md documents MSBuildImportedProject thoroughly but does not mention that it is intentionally absent from the XSD schema (since it is engine-synthesized, not user-authored). Adding a sentence such as "Note: MSBuildImportedProject is not listed in the XSD schema because it is synthesized by the engine and not intended to be authored in project files." would make the design intent explicit for future contributors.

Summary

The change is correct, minimal, and follows established precedent. The MSBuildProvideImportedProjects property correctly remains in the XSD. No ChangeWave is needed — this is a schema/tooling change, not a behavioral engine change. No backwards compatibility concern: users cannot author MSBuildImportedProject items and the engine still synthesizes them at runtime.

  • (Optional) Add note to documentation/Built-in-Properties.md that MSBuildImportedProject is excluded from XSD intentionally

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • patchdiff.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "patchdiff.githubusercontent.com"

See Network Configuration for more information.

Generated by Expert Code Review (on open) for #14659 · sonnet46 · 48.1 AIC · ⌖ 5.22 AIC · ⊞ 5.2K

@drewnoakes
drewnoakes temporarily deployed to copilot-pat-pool August 7, 2026 12:14 — with GitHub Actions Inactive

@rainersigwald rainersigwald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@ViktorHofer ViktorHofer self-assigned this Aug 25, 2026
@ViktorHofer
ViktorHofer enabled auto-merge (squash) August 27, 2026 13:53
@ViktorHofer
ViktorHofer merged commit 1eecb3d into dotnet:main Aug 27, 2026
10 checks passed
@drewnoakes
drewnoakes deleted the dev/drnoakes/remove-msbuildimportedproject-xsd branch September 17, 2026 11:48
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.

4 participants