Search code examples
c#.net-6.0com-interop

.NET 6.0 comhost registration fails with error 0x80008083


I am migrating a managed 32-bit COM component from .NET Framework 4.8 to .NET 6. Regsvr32 will register its xxx.comhost.dll on the development machine, but not on a non-development machine: it fails with the error message "The module 'xxx.comhost.dll' was loaded but the call to DllRegisterServer failed with error code 0x80008083."

The error description is "CoreHostLibMissingFailure 0x80008083 -2147450749 131 One of the dependent libraries is missing. Typically when the hostfxr, hostpolicy or coreclr dynamic libraries are not present in the expected locations. Probably means corrupted or incomplete installation"

The .NET 6.X runtimes installed on the dev machine are in fact installed on the target VM. The component's runtime configuration is as follows

{
  "runtimeOptions": {
    "tfm": "net6.0",
    "rollForward": "LatestMinor",
    "frameworks": [
      {
        "name": "Microsoft.NETCore.App",
        "version": "6.0.0"
      },
      {
        "name": "Microsoft.WindowsDesktop.App",
        "version": "6.0.0"
      }
    ],
    "configProperties": {
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false
    }
  }
}

Any suggestions as to which dependency might be missing or what is misconfigured?


Solution

  • The missing dependency is the Microsoft Windows Desktop Runtime - 6.X.XX (x86).

    Somehow, the correct (x86) .NET 6.0 runtime found its way to the development machine at some point, even though it is not explicitly listed in Control Panel Add/Remove Programs. The target machine, like the development machine, had the .NET 6.0 runtime (x64) explicitly installed, but this installer does not bring the needed 32-bit binaries..