単体テスト用の DLL をインストールする必要があるものを使用して、 GitHubMathNet Numerics
からの最新バージョンをビルドしようとしています。Visual Studio Community 15
MathNet.Numerics.sln
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".
したがって、Visual Studio 内から NuGet を使用すると、以下を正常にインストールできます。
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
残っている唯一の DLL は
FsUnit.CustomMatchers
私は見つけることができません。
ヒントは ですが、の下にディレクトリ..\..\packages\test\FsUnit\lib\FsUnit.CustomMatchers.dll
がありません。test
packages
これを正しく解決するにはどうすればよいですか?
DLL は必要ですか? 必要な場合はどこにありますか?
手動でコードを修正する必要がありますか?
ヒントを更新する必要がありますか?
TLDR;
欠落している DLL なしでビルドすると、基本的なエラーは次のようになります。
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
インストールすることで解決できます
Microsoft.VisualStudio.QualityTools.UnitTestFramework
と追加
open Microsoft.VisualStudio.TestTools.UnitTesting
の署名がある
Assert.IsTrue(condition: bool, message: string, [<ParamArray>] args: obj []) : unit
しかし、それは正しい DLL ( Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
vs FsUnit.CustomMatchers
) をインストールしないため正しくありません。また、過去の F# ユニット テストの経験から、そのようにすることで誤検知を可能にする字幕があることを認識しています。
編集:
インストールに成功した後、これがどこに文書化されているか知りたいと思いました。
参照: Math.NET 数値の構築
unit tests
、ドキュメント、API リファレンス、NuGet および Zip パッケージを含む完全に自動化されたビルドは、FAKE を使用しています。