Skip to content

[dotnet-svcutil] Fully qualify XmlSchemaProvider to ensure correct resolution #5796

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

heatonmatthew
Copy link

Addresses issue #5792: Fully qualify the use of the XmlSchemaProvider attribute with the correct namespace so that types which belong in non-default Xml namespaces can be correctly resolved from referenced libraries and projects. Without this fix, it resolves to the renamed XmlSchemaProvider type in the forked framework, causing the applied attribute to not be located and the type incorrect not matches as it's assumed to be in the default Xml namespace for a referenced assembly. The effect is that the type is treated as non-reusable.

This is similar to @imcarolwang fix for #5638.

transmax-open-source and others added 4 commits June 7, 2025 10:03
…aExporter.cs.

Refactor the ReuseIXmlSerializableType test to reference a csproj instead of pre-compiled assembly (in preparation for adding additional test type).
… from a custom namespace that requires the XmlSchemaProvider attribute.
@heatonmatthew
Copy link
Author

@dotnet-policy-service agree company="Transmax"

@heatonmatthew
Copy link
Author

Note that I've extended the existing ReuseIXmlSerializableType unit test as it seemed the appropriate location. Previously that test used a pre-built binary for CommonTypes.dll that was checked into the repository. This made it difficult to either extend the existing test or write a parallel test using a similar referenced type assembly, so I substituted the pre-built binary for an equivalent CommonTypes.csproj. That enabled me to build on the previous work by adding the new type required in the unit test case.

@heatonmatthew
Copy link
Author

Being unfamiliar with the test pipelines, I'm unsure whether the failures are known race-conditions or genuine failures. Is anyone able to offer any advice or assist? Thanks. 😄

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.

2 participants