【发布时间】:2015-06-10 18:05:03
【问题描述】:
我有一个在 Windows 上运行良好的示例 .NET 应用程序,我的 Ubuntu 环境使用单声道。
我正在尝试使用 Mkbundle 创建单个本机程序集,以便我可以使用 busybox 将其 docker 容器化并保持较小的大小而不是通常巨大的臃肿容器。
我遇到的问题是 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 都会产生以下错误
【问题讨论】: