NUnit を使用して 2 つのアセンブリでテストを実行する MSBuild スクリプトがあります。これらは .NET Framework 3.5 上にあり、長い間完全に機能していました。
コマンドラインは次のとおりです:(実際のパスと名前は簡略化されています)
nunit-console tests1\bin\debug\tests1.dll tests2\bin\debug\tests2.dll
VS2010 にアップグレードし、2 つのテスト アセンブリのターゲットを .NET 4.0 にしました。また、NUnit 2.5.4 にアップグレードしました。
次のようにして、単一のアセンブリを単体テストできます。
nunit-console tests1\bin\debug\tests1.dll /framework=4.0.30319
tests1.dll または tests2.dll で問題なく動作します。
以前のように両方を指定しようとすると、失敗するようになりました。
nunit-console tests1\bin\debug\tests1.dll tests2\bin\debug\tests2.dll /framework=4.0.30319
エラーは次のとおりです。
Could not load file or assembly 'tests2' or one of its dependencies. The system cannot find the file specified.
fuslogvw を調べたところ、tests1\bin\debug および nunit-console フォルダーで tests2 が検索されていることがわかります。コマンドラインで指定されていても、tests2\bin\debug は検索されません。
どうしたの?