I have Markdown Monster version 1.25.15 and am trying to use mmcli.exe to generate MD to HTML files from the command line. My command is:
mmcli.exe markdowntohtml -i "C:\temp\test.md" -o "C:\temp\test.html" --theme "Dharkan" --rendermode html
The generated test.html file contains the text:
Unable to render Markdown Document
An error occurred trying to parse the Markdown document to HTML.
Error
Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I found some references to the System.Runtime.CompilerServices.Unsafe assembly that apply to developers creating software but I'm not sure how it applies to me as a user to Markdown Monster.
What can I do to get mmcli working?
Hmmm... that looks like possibly the executable needs to be recompiled. I'll take a look.
Thanks...
+++ Rick ---
Can you try to add the following file into your MM install folder (%localappdata%\Markdown Monster
by default):
mmCli.exe.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.11.29.0" newVersion="1.11.29.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Mono.Cecil" publicKeyToken="50cebf1cceb9d05e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.11.3.0" newVersion="0.11.3.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
That should apply to the proper bindings for the importer to work.
I'll get this updated for the next version so this file is distributed with the installer.
+++ Rick ---