-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update IntelliSense XSD to support multiple metadata representations #7028
Comments
There's also duplication (and IIRC inconsistent replication) of metadata across different item types ( It might make sense to introduce a new type in the schema to represent common metadata for items that represent files in the project, including |
Do you know offhand how to represent that in XSD? If not no need to look it up or anything, just checking :) I wonder if we may be able to use this to solve another issue we have which is that the XSDs are localized in the VS repo because there wasn't any tooling support for XSD localization in public at the time we open-sourced. But if the XSD was a generated artifact we could pull from standard loc infra XLF. Of course the real fix is #1774 or https://github.com/mhutch/MonoDevelop.MSBuildEditor, so maybe we shouldn't overengineer this. |
The code that inspired the idea is the definition of msbuild/src/MSBuild/MSBuild/Microsoft.Build.Core.xsd Lines 415 to 454 in 2b604c3
That definition is then used in msbuild/src/MSBuild/MSBuild/Microsoft.Build.CommonTypes.xsd Lines 695 to 701 in 2b604c3
The intermediary level would likely need both a |
Is the goal here just to make the two representations have the same content, or is it to use the base types so you only have to specify metadata valid for a particular item type in one place? The latter seems nicer, but it doesn't sound doable from what I see here; you can specify a base type that applies the same thing to everything that uses it, but if we have a specific set of things to add as metadata for an item, only that item would be able to extend the base type, so you haven't gained anything. The annotations and subelements have different formats, so you also can't replicate between the two of them. Am I missing something? |
The two representations are equivalent in MSBuild and should be equivalent in the intellisense. Making them have the same representation in the XSD would be nice. But I don't think it's required--we could instead make the canonical checked-in representation some other thing and generate an XSD with the correct doubling. |
That's an interesting idea and sounds very doable...but also much more like a BenVillalobos project than something for me 😉 |
You can represent item metadata either as subelements or as attributes of the item XML element. The XSD should provide equivalent IntelliSense for both (but doesn't today, because in XSD the representations are distinct).
The text was updated successfully, but these errors were encountered: