[Breaking change]: The IDispatchImplAttribute
API has been removed from .NET 8+
#36729
Closed
1 of 3 tasks
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.
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 aTypeLoadException
.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
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
The text was updated successfully, but these errors were encountered: