Skip to content
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

[Breaking change]: The IDispatchImplAttribute API has been removed from .NET 8+ #36729

Closed
1 of 3 tasks
AaronRobinsonMSFT opened this issue Aug 16, 2023 · 0 comments · Fixed by #36788
Closed
1 of 3 tasks
Assignees
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@AaronRobinsonMSFT
Copy link
Member

AaronRobinsonMSFT commented Aug 16, 2023

Description

The IDispatchImplAttribute implementation was officially removed from .NET 8. This type was only discoverable at runtime and has no impact on visible API surface area. However, if an assembly targeting .NET Framework is using this type and is loaded in .NET 8, the runtime will throw a TypeLoadException.

Version

.NET 8 Preview 6

Previous behavior

The type would be found at runtime, but none of the documented semantics of the attribute would apply.

New behavior

Attempting to load an assembly containing this attribute will now throw a TypeLoadException.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

Reason for change

This attribute was removed as it was not longer respected and served no functional purpose.

Recommended action

The solution here is to remove use of this API in assemblies that should be loaded in .NET 8+.

Feature area

Interop

Affected APIs

No response


Associated WorkItem - 153927

@AaronRobinsonMSFT AaronRobinsonMSFT added doc-idea Indicates issues that are suggestions for new topics [org][type][category] breaking-change Indicates a .NET Core breaking change Pri1 High priority, do before Pri2 and Pri3 labels Aug 16, 2023
@dotnet-bot dotnet-bot added ⌚ Not Triaged Not triaged binary incompatible Existing binaries may encounter a breaking change in behavior. labels Aug 16, 2023
@gewarren gewarren removed the ⌚ Not Triaged Not triaged label Aug 21, 2023
@ghost ghost added the in-pr This issue will be closed (fixed) by an active pull request. label Aug 22, 2023
@ghost ghost removed the in-pr This issue will be closed (fixed) by an active pull request. label Aug 22, 2023
@gewarren gewarren added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Aug 29, 2023
@github-actions github-actions bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary incompatible Existing binaries may encounter a breaking change in behavior. breaking-change Indicates a .NET Core breaking change doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants