使用unquote库和Visual Studio 2015运行xunit测试时出错 - 找不到方法

4

在Visual Studio 2015中出现错误“System.MissingMethodException:找不到方法:'Swensen.Unquote.UnquotedExpression Swensen.Unquote.Operators.unquote(Microsoft.FSharp.Quotations.FSharpExpr)” 。在Visual Studio 2013尝试过,可以正常工作。


1
几乎可以确定您正在使用一些引用的不兼容版本。 - John Palmer
1个回答

11

您需要在与单元测试项目相关联的 app.config 文件中添加一个程序集重定向。以下内容应该可以胜任:

<?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="4.3.1.0"
                         newVersion="4.4.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接