Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I not able to use the latest version of NUnit and FsCheck with F#?

Tags:

f#

nunit

fscheck

I would like to use the latest versions of NUnit, FsCheck, and F#. However, when I point to the latest versions of my packages, my unit tests do not get discovered.

However, my property-based tests are discovered (i.e. FsCheck).

My packages are the following:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="FsCheck" version="2.4.0" targetFramework="net461" />
  <package id="FsCheck.Xunit" version="2.4.0" targetFramework="net461" />
  <package id="FSharp.Core" version="4.0.0.1" targetFramework="net461" />
  <package id="FsUnit" version="2.2.0" targetFramework="net461" />
  <package id="NUnit" version="3.2.1" targetFramework="net461" />
  <package id="xunit.abstractions" version="2.0.0" targetFramework="net461" />
  <package id="xunit.extensibility.core" version="2.1.0" targetFramework="net461" />
  <package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net461" />
  <package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net461" />
</packages>

My app.config is the following:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.4.0" sku=".NETFramework,Version=v4.6.1" />
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-9999.9999.9999.9999" newVersion="3.2.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
like image 644
Scott Nimrod Avatar asked May 29 '16 11:05

Scott Nimrod


1 Answers

Have you tried installing the NUnit3 test adapter so that Visual Studio knows about NUnit? https://www.nuget.org/packages/NUnit3TestAdapter

It could be that your FsCheck tests are found because Visual Studio already knows about XUnit.

like image 181
marklam Avatar answered Oct 15 '22 23:10

marklam