2017-10-26 13 views
3

プロジェクトが存在するフォルダにいるときに "dotnet xunit"することができます。コマンドラインから "dotnet xunit PathToLibrary.dll"を実行する方法(継続的インテグレーションで)

コンパイルされたdllをパラメータとして渡したいコマンドラインからどうすればいいですか?

dotnet xunit PathToLibrary.dll 

私はエラーを取得する:

No executable found matching command "dotnet-xunit" 

は、私は現在のフォルダの中に(nuget xunit.core.2.3.0から入手) "xunit.execution.desktop.dll" をコピーしたが、それはありません助けません。

答えて

6

DOTNET-のxUnitは、だからあなたの.csprojが

<ItemGroup> 
    <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" /> 
</ItemGroup> 

が、その後

dotnet restore 
を行う含まれていることを確認し per-project CLI tool

Consuming these tools requires you to add a <DotNetCliToolReference> element to your project file for each tool you want to use. Inside the <DotNetCliToolReference> element, you reference the package in which the tool resides and specify the version you need. After running dotnet restore, the tool and its dependencies are restored.

です

関連する問題