我有一个在 Windows 上运行良好的示例 .NET 应用程序,我的 Ubuntu 环境使用单声道。
我正在尝试使用 Mkbundle 创建一个单一的本机程序集,这样我就可以使用busybox 将它的容器化并保持尺寸小而不是通常巨大的臃肿容器。
我遇到的问题是 Json.net,我认为这是由于来自 app.config 文件的程序集绑定重定向,还有其他人遇到过这个吗?
<?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>
并且无论是否使用 --static 都会产生以下错误