-
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
Support packages/custom Sdks to provide their own XSD #11026
Comments
Ideas:
General problem: PackageReference conditional on TargetFramework. If the project is multitargeted and different target frameworks use different versions of the same package, then which version of the XML schema should be used by the XML editor? General problem: if the VS user opens a file that is imported to multiple projects that reference packages that carry MSBuild XML schema files, how does VS choose the project whose package references should control the schemata in the XML editor? |
Good question. I think that should be a merge of everything. In case of conflicts, it could show the property multiple times. For example, |
This is a great idea but as far as I know the Visual Studio XML editor doesn't support this type of dynamic discovery. https://github.com/mhutch/MonoDevelop.MSBuildEditor has "sidecar schema" support for this scenario. |
Summary
Today, csproj IntelliSense is only driven by XSDs provided by MSBuild. I think it would be nice to have some sort of extensibility and allow NuGet packages and/or custom MSBuild Sdks to provide their own XSD.
Background and Motivation
Many NuGet packages (regular ones and Sdks) offer some MSBuild properties intended for use by consumers. Today, first-party authors have to make the change in this repo, and third-party authors have no way to do it (assuming they don't go too crazy and grab the XSD from VS installation and attempt to modify it).
Proposed Feature
Not sure if the exact shape or technical limitations here, but having something like
Sdk.xsd
(like Sdk.props and Sdk.targets that are special cased for custom Sdks) would be nice. For regular NuGet packages, it could bebuild\<PackageName>.xsd
.Any other design that solves the problem is also good.
Alternative Designs
No response
The text was updated successfully, but these errors were encountered: