Team Services Build vNext で xUnit を動作させる方法を詳述したいくつかのブログをフォローした後:
http://tech.trailmax.info/2014/01/run-xunit-in-hosted-team-foundation-service/
http://www.donovanbrown.com/post/2015/06/15/how-to-run-xunit-test-with-vnext-build
どれも私にとってはうまくいきませんでした。ビルド ログを調べると、テスト アセンブリごとに次の警告が表示されます。
--------------------
Warning: [xUnit.net 00:00:00.1644156] Exception discovering tests from CHO.SAM.Business.Test: System.BadImageFormatException:
Could not load file or assembly 'c:\_Work\473cef3c\CHO\CHO.ALL\Tests\CHO.SAM.Business.Test\CHO.SAM.Business.Test\bin\Debug\xunit.execution.desktop.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
--------------------
誰もこれを見たことがありますか?もしそうなら、あなたは解決策を見つけましたか?
私の考えは次のとおりです。私のテスト プロジェクトは .NET Framework 4.6 を使用してコンパイルされていますが、これが問題の原因ではないかと考えていました。もしそうなら、単一のテストフレームワークを使用するためだけにコンパイルを変更するのは正しくないと思うので、nUnit などに移行する必要があります。