I have a sample .NET application that runs fine on windows, and my Ubuntu environment using mono.
I am trying to use Mkbundle to create a single native assembly so I can docker containerize it using busybox and keep the size small instead of the usually huge bloated containers.
The problem I am running into is with Json.net, I think its due to assembly binding redirection from the app.config file, anyone else ran into this?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
And its producing the following error both with and without --static
How I got around it was to specify the --nodeps flag.
However, when you run it, it may give you errors like...
or
You'll then have to specify any missing dependencies manually (I know, kinda of stinks)