1

A few days ago i updated the MimeKit from 3.3.0 to 3.4.0, but when i move the app from my development environment to my test environment, MimeKit 3.4.0 throws a strange exception:

Could not load file or assembly 'MimeKit, Version=3.3.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

As mentioned earlier, I've updated the MimeKit.DLL and MimeKit.XML to the new 3.4.0 files, but something must be reffering to the old 3.3.0, but i cannot install both the 3.3.0 and the 3.4.0 files as they have the same names (MimeKit.DLL and MimeKit.XML). But why does it work in my development envirionment, thats the most odd thing, how is that handling 2 versions at the same time?

I tried removing MailKit and MimeKit, and then installing 3.4.0 MimeKit first and then MailKit 3.3.0 but same result as installing MailKit 3.3.0 and then updating MimeKit from 3.3.0 to 3.4.0, no matter what I do the test environment keeps throwing that same exception.

Any suggestions?

Kind regards FrankieDK

1 Answers1

0

MailKit 3.3.0 depends on MimeKit 3.3.0 (that's what it was originally linked with).

You should be able to map it in an app.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="MimeKit" publicKeyToken="0e99375e54769942" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.3.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Another option is to install MimeKit 3.3.0 instead of 3.4.0.

I was planning to release MailKit 3.4.0 along side MimeKit 3.4.0 (my normal operating procedure), but something came up and has been preventing me from having the time to make a MailKit 3.4.0 release.

jstedfast
  • 35,744
  • 5
  • 97
  • 110