MissingMethodException when using Unquote asserts

人盡茶涼 提交于 2019-12-01 06:23:26
Stephen Swensen

Based on the description of your problem, I suspect you need to configure your NUnit project with an FSharp.Core binding redirect from version 4.0.0.0 to version 4.3.0.0 since the latest version of Unquote is built for .NET 4.0 and your test project targets .NET 4.5.

See this Unquote issue for details. I believe your configuration would look something like

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

I'm not sure exactly where you would need to put this for an NUnit project, but maybe in the config file specified through the Project Editor?

Unfortunately, I don't have VS2012 installed and so I am somewhat crippled in my ability to really diagnose this issue for you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!