In trying to build the latest version of MathNet Numerics
from GitHub using Visual Studio Community 15
with MathNet.Numerics.sln
which needs DLLs for unit testing installed.
Could not resolve this reference. Could not locate the assembly "FsUnit.CustomMatchers".
Could not resolve this reference. Could not locate the assembly "FsUnit.NUnit".
Could not resolve this reference. Could not locate the assembly "nunit.framework".
So using NuGet from within Visual Studio the following can be successfully installed.
Successfully installed 'NUnitTestAdapter.WithFramework 2.0.0' to UnitTests
Successfully installed 'FSharp.Core 3.1.2.5' to FSharpUnitTests
Successfully installed 'NUnit 3.0.1' to FSharpUnitTests
Successfully installed 'FsUnit 2.0.0' to FSharpUnitTests
The only DLL remaining is
FsUnit.CustomMatchers
which I am unable to locate.
The hint is ..\..\packages\test\FsUnit\lib\FsUnit.CustomMatchers.dll
, yet there is not test
directory under packages
.
How do I correctly resolve this?
Do I need the DLL and if so where can it be located?
Do I need to make a manual code fix?
Do I need to update the hint?
TLDR;
If I build without the missing DLL the basic error is:
A unique overload for method 'IsTrue' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates:
Assert.IsTrue(condition: Nullable<bool>, message: string, [<ParamArray>] args: obj []) : unit,
Assert.IsTrue(condition: bool, message: string, [<ParamArray>] args: obj []) : unit
which can be resolved by installing
Microsoft.VisualStudio.QualityTools.UnitTestFramework
and adding
open Microsoft.VisualStudio.TestTools.UnitTesting
which has the signature of
Assert.IsTrue(condition: bool, message: string, [<ParamArray>] args: obj []) : unit
but that is not correct as it does not install the correct DLL (Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
vs FsUnit.CustomMatchers
) and from past experience with F# Unit testing I am aware of the subtitles that could allow false positives by doing such.
EDIT:
After successfully installing I wanted to know where this was documented.
See: Building Math.NET Numerics
The fully automated build including
unit tests
, documentation and api reference, NuGet and Zip packages is using FAKE.