gpt4 book ai didi

f# - FSharp.核心 : Could not load file or assembly

转载 作者:行者123 更新时间:2023-12-02 08:19:02 29 4
gpt4 key购买 nike

尝试运行测试时出现以下错误:

{System.IO.FileLoadException: Could not load file or assembly 'FSharp.Core, Version=3.3.1.0, 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) File name: 'FSharp.Core, Version=3.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Register.RegisterResponse.__DebugDisplay()

Tests.dll

FSharp.Core: 3.1.2.5

目标 F# 运行时:4.3.1.0

目标框架:4.6

输出类型:类库

ManageAccount.dll

FSharp.Core: 3.1.2.5

目标 F# 运行时:3.3.1.0

目标框架:.NET 可移植子集(.Net Framework 4.5、ASP.Net Core 1.0、Windows 8)

输出类型:类库

然后我将以下应用配置添加到我的测试项目中:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral"/>
<bindingRedirect oldVersion="3.1.2.5" newVersion="3.3.1.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

如果我确实需要应用配置,我的 bindingRedirect 应该设置什么值?

最佳答案

尝试 <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="3.3.1.0" /> .这就是大多数 F# 项目似乎正在为 FSharp.Core 做的事情。 (或者 newVersion="4.3.1.0" ,甚至是 newVersion="4.4.0.0" 如果您升级到更新的 FSharp.Core)。

关于f# - FSharp.核心 : Could not load file or assembly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39206991/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com