I'm playing with unit testing in F#. I'm running Visual Studio 2013 Community Edition. I created a test project and installed NUnit 2.6.4
and FsUnit 1.3.0.1
. I used Package Manager Console. I added references to the libraries in the project and in my script file I referenced the DLLs and added open
clauses:
#r @"C:\Users\pw\Documents\Visual Studio 2013\Projects\FSharpForQuantFirst\packages\FsUnit.1.3.0.1\Lib\Net40\FsUnit.NUnit.dll"
#r @"C:\Users\pw\Documents\Visual Studio 2013\Projects\FSharpForQuantFirst\packages\NUnit.2.6.4\lib\nunit.framework.dll"
open NUnit.Framework
open NUnit.Framework.Constraints
open FsUnit
1 |> should equal 1
There are no errors nor warnings in my code. However, when I run the code in F# Interactive the last line triggers the following error:
Test.fsx(8,6)
: errorFS0074
: The type referenced through'NUnit.Framework.Constraints.Constraint'
is defined in an assembly that is not referenced. You must add a reference to assembly'nunit.framework'
.
But I've already added the reference to nunit.framework
.
I cleaned the project, reinstalled the packages, removed and added references, but the result is the same. I still get the error. Any idea what's the problem and how to solve it?