Skip to content

How to change the ComHost Server registry name? #62529

@forderud

Description

@forderud

I'm working on a plugin-based application architecture that relies on custom naming of the COM server classes in the registry. The <project>.comhost.dll COM server generated for projects relying on <EnableComHosting> today always seem to be named CoreCLR COMHost Server which says nothing about the COM server. I am therefore seeking a mechanism for either more informative default naming or an ability to override the name.

Is there a mechanism for customizing the COMHost server name to something else than "CoreCLR COMHost Server"?

Steps to reproduce

  1. Build the https://github.com/dotnet/samples/tree/main/core/extensions/COMServerDemo/COMServer
  2. Register COMServer.comhost.dll with regsvr32.exe
  3. Open RegEdit.exe and observe that the server name is "CoreCLR COMHost Server" in the Computer\HKEY_CLASSES_ROOT\CLSID{DB1797F5-7198-4411-8563-D05F4E904956} registry folder:
    image

.Net framework behavior

The .Net framework 4.x solved this problem for projects enabling "Register for COM interop" by using the same ProgId string also for the COM server name. Using the same naming scheme also in .Net core would be an acceptable outcome for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions