Skip to content

Breaking change announcement: IMetadataImport related interfaces being removed on cross-platform .NET scenarios #124

@gregg-miskelly

Description

@gregg-miskelly

Overview

Microsoft.VisualStudio.Debugger.Metadata currently exposes four COM interop definitions that are being deprecated. In cross-platform .NET scenarios (VS Code, and VS remote-debugging-to-Linux) these will be removed entirely in an upcoming release, while in VS the old interfaces will continue to exist for now.

The interfaces in question --

  • Microsoft.MetadataReader.IMetadataImport
  • Microsoft.MetadataReader.IMetadataImport2
  • Microsoft.MetadataReader.IMetadataAssemblyImport
  • Microsoft.MetadataReader.IMetadataTables

These are being replaced with new types in the Microsoft.MetadataReader.PortableInterop namespace that have different signatures. This is being done because we are changing to use COM Wrappers for COM marshalling and the old interfaces had many incompatibilities with that technology (in addition to there just being many bugs in methods that debugger-owned code didn't call).

Rollout plan

The new interface is available in the 18.0.1082202-preview nuget package.

For cross-platform .NET scenarios, we are working on releasing an interim version that exposes the new PortableInterop interface, while still maintaining the existing API. If any partners are affected by this change in cross-platform .NET scenarios, we would like to work with you on updating your implementation during this period, so please contact us. After this period passes, we will update to a new COM Wrapper-based vsdbg that removes these interfaces entirely.

This interim release will ship with:

  • C# extension version 2.91
  • vsdbg version 18.0.10821.2

For Visual Studio, the legacy interfaces will continue to exist for the forceable future. The PortableInterop interfaces will ship in Visual Studio 2026 and newer.

This issue will be updated when the relevant cross-platform .NET releases come out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions