我们的 C# 应用程序使用 .Net Framework 4.7.2,我们尝试在 System.Text.Json 中实现 JsonSerializer。我们能够毫无问题地构建解决方案,但是当我们尝试运行该应用程序时,我们会收到以下错误
解决失败:System.Runtime.CompilerServices.Unsafe,Version=4.0.4.1,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a 运行时捕获异常:Main System.IO.FileLoadException:无法加载文件或程序集“System.Runtime.CompilerServices.Unsafe” 、Version=4.0.4.1、Culture=neutral、PublicKeyToken=b03f5f7f11d50a3a' 或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(HRESULT 异常:0x80131040)文件名:'System.Runtime.CompilerServices.Unsafe,Version=4.0.4.1,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a' at System.Span`1..ctor(T[] array) at System .Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options) at Project.Class1.Main(String[] args) in D:\Project\Class1.cs:line 36
查看 NuGet 中安装的 System.Rutime.CompilerServices.Unsafe 版本,它是 5.0.0,在我们的 app.config 文件中,我们有以下内容:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<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>
Run Code Online (Sandbox Code Playgroud)
现在,由于 4.0.4.1 在旧版本的范围内,我认为它应该重定向到 5.0.0.0 而不是寻找 4.0.4.1,但我一定是弄错了。我还尝试将旧版本更改为“4.0.4.1”,但这没有帮助。
如果我尝试将 System.Runtime.CompilerServices.Unsafe 的版本更改为包版本 4.5.3(对应于版本 4.0.4.1),则 System.Text.Json 需要从 5.0.2 降级到 2.0.0.11。此版本不包含 JsonSerializer,因此它不适用于我们的应用程序。
有没有一种方法可以让我们成功地从查找旧版本(4.0.4.1)重定向到查找已安装的最新版本(5.0.0.0)?如有任何反馈或建议,我们将不胜感激!
我正在绘制多个方差分析研究,我希望我的误差条宽度及其上限厚度小于趋势线。绘制带有误差线和上限的三向方差分析时,可能会感觉很拥挤。我当前的情节看起来像这样:

我绘制此图的函数是:
sns.catplot(x="dose", y="somethings", hue="position", kind="point",
palette=sns.xkcd_palette(colors), capsize=.15, data=df, aspect=1.5)
Run Code Online (Sandbox Code Playgroud)
我尝试包含诸如lw_conf(https://github.com/mwaskom/seaborn/pull/898)之类的关键字,但我不确定在factorplot更改为catplot后它的功能发生了什么。我还尝试了 matplotlib 中的 errorbar 关键字,例如elinewidth和capthick。Catplot 似乎将其capsize作为关键字参数,但我不知道它可能会采用哪些其他关键字或发生了什么lw_conf。任何有关该关键字可能发生的情况或完成此任务的新方法的反馈将不胜感激。谢谢!