带有FSharp.Core版本" 4.3.1.0"的.NET FileLoadException

时间:2016-10-19 23:52:03

标签: .net f#

我正在使用NUnit框架开发一些新的单元测试。有些人过去了,直到我遇到了F#用户的可怕例外。我已确保在packages.config文件中添加bindingRedirect节点,但它无效。

 <?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="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
                <packages>
                  <package id="Akka" version="1.1.2" targetFramework="net461" />
                  <package id="Akka.FSharp" version="1.1.2" targetFramework="net461" />
                  <package id="Akka.TestKit" version="1.1.2" targetFramework="net461" />
                  <package id="Akka.TestKit.NUnit" version="1.1.2" targetFramework="net461" />
                  <package id="FsPickler" version="1.2.21" targetFramework="net461" />
                  <package id="FSPowerPack.Core.Community" version="3.0.0.0" targetFramework="net461" />
                  <package id="FSPowerPack.Linq.Community" version="3.0.0.0" targetFramework="net461" />
                  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
                  <package id="NUnit" version="3.5.0" targetFramework="net461" />
                  <package id="NUnit3TestAdapter" version="3.4.1" targetFramework="net461" />
                  <package id="NUnitTestAdapter" version="2.0.0" targetFramework="net461" />
                  <package id="System.Collections.Immutable" version="1.1.36" targetFramework="net461" />
             </packages>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>

查看下面的链接并没有帮助我解决问题。

  1. FSharp.Core: Could not load file or assembly
  2. Could not load file or assembly FSharp.Core, Version=4.0.0.0 Azure Web Role
  3. .NET runtime tries to load FSharp.Core 4.3.0 even if all projects reference 4.3.1

0 个答案:

没有答案