Skip to content

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

@AaronRobinsonMSFT

Description

@AaronRobinsonMSFT

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

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.binary incompatibleExisting binaries may encounter a breaking change in behavior.breaking-changeIndicates a .NET Core breaking change

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions