IXamlMetadataProvider generation should be based on the "public" metadata, not the internal metadata #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #22
The problem is that our IXMP generated code answers for "private" types, which causes problems where the parser starts asking about types like XamlAmbientLight which it finds squirreled away in the UIElement tree. It asks about these types because "private" DependencyProperties refer to those types and our IXMP implementation returns a XamlType instance corresponding to it. That then causes the .NET runtime to try to turn the TypeName into a real type and it crashes because there's no metadata in the app's WinMDs of that typename. The parser folks recommended that we just return null for "private" types so in this change I switched the XamlMetadataProvider codegen to use the winmd file that's included in the nuget package instead of the "private" one. This way our IXMP is in sync with what's in the nuget package.
Verified that the nuget package with this fix allows XamlControlsGallery to launch again.
Tests passed: https://microsoft.visualstudio.com/WinUI/_build/results?buildId=13332466&_a=summary