Skip to content

[dotnet-svcutil] Fully qualify IXmlSerializable to ensure correct resolution #5746

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

Merged
merged 3 commits into from
Mar 6, 2025

Conversation

imcarolwang
Copy link
Contributor

Addressing issue #5638: Fully qualify IXmlSerializable with the correct namespace to ensure proper identification of reusable referenced types. Without this fix, it resolves to the renamed type in the forked framework, causing Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) to incorrectly return false for user-defined types, resulting in them being treated as non-reusable.

@imcarolwang imcarolwang changed the title Fully qualify IXmlSerializable to ensure correct resolution [dotnet-svcutil] Fully qualify IXmlSerializable to ensure correct resolution Feb 27, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This pull request ensures the correct resolution of IXmlSerializable by fully qualifying its namespace to System.Xml.Serialization.IXmlSerializable, addressing issue #5638 and preventing misidentification of reusable types.

  • Update in Globals.cs to fully qualify IXmlSerializable
  • Addition of a new global tool test to validate reusable type resolution
  • Inclusion of generated service reference code for compatibility

Reviewed Changes

File Description
src/dotnet-svcutil/lib/tests/Baselines/ReuseIXmlSerializabaleType/ReuseIXmlSerializabaleType/ServiceReference/Reference.cs Auto-generated service reference code
src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs Added global tool test to verify type reuse behavior
src/dotnet-svcutil/lib/src/FrameworkFork/System.Runtime.Serialization/System/Runtime/Serialization/Globals.cs Changed IXmlSerializable to fully qualified System.Xml.Serialization.IXmlSerializable

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

@imcarolwang imcarolwang merged commit d2428d4 into dotnet:main Mar 6, 2025
8 of 15 checks passed
@imcarolwang imcarolwang deleted the issue5638 branch May 29, 2025 08:49
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