Share via


Migrate 64-bit debugger COM class registration

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

For debugger extensions that register COM classes in HKEY_CLASSES_ROOT by using regasm, regsvr32, or directly writing to the registry and loaded into msvsmon.exe (the remote debugger), it's now possible to provide this registration to msvsmon without needing to write to HKEY_CLASSES_ROOT. This affects legacy .NET debugger expression evaluators or debug engines that are configured to load in the msvsmon.exe process.

msvsmon-comclass-def

To use this technique, add a .msvsmon-comclass-def.json file next to msvsmon (InstallDir: \Common7\IDE\Remote Debugger\x64*).

Here is an example msvsmon-comclass-def file that registers one managed, and one native class:

FileName: MyCompany.MyExample.msvsmon-comclass-def.json

{
  "managedCOMClasses": [
    {
      "clsid": "{C9F48B25-36ED-4B22-8210-98BC5BE4D1E7}",
      "assemblyName": "MyCompany.MyAssembly",
      "className": "MyCompany.MyNamespace.MyClass"
    }
  ],
  "nativeCOMClasses": [
    {
      "clsid": "{42A476E9-8FA7-44D5-ADFE-216AD371EEC9}",
      "dllPath": "MyExample.dll"
    }
  ]
}