Exception with Interop.hMailServer COM API on .net core 3.1

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
naren
New user
New user
Posts: 25
Joined: 2019-04-30 09:01

Exception with Interop.hMailServer COM API on .net core 3.1

Post by naren » 2020-08-07 07:50

I am getting below exception when using Interop.hMailServer on .net core 3.1

First i got below error when my platform is "Any CPU" or x64,

BadImageFormatException: Could not load file or assembly 'Interop.hMailServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. An attempt was made to load a program with an incorrect format.

Then i changed platform target to x86, and now i am getting below error.

COMException: Retrieving the COM class factory for component with CLSID {D6567EF8-0A6C-48E7-9288-A2463123C2F3} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).


I am using x64 based windows 10 machine and hMailServer 5.6.8 - Build 2431

Does anyone know how to fix this issue ?

User avatar
mattg
Moderator
Moderator
Posts: 21115
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Exception with Interop.hMailServer COM API on .net core 3.1

Post by mattg » 2020-08-07 09:36

What dot net versions do you have installed?

Add windows features, add Dot Net 3.5 (if not already done) and see if that fixes the issue
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

naren
New user
New user
Posts: 25
Joined: 2019-04-30 09:01

Re: Exception with Interop.hMailServer COM API on .net core 3.1

Post by naren » 2020-08-09 06:32

I added Dot Net 3.5, but still not working. Let me do more troubleshooting

Post Reply