私はCakeBuildを使ってXamarin Portable Class Libraryをビルドしてテストしました。CakeBuild:ツール 'NUnit.ConsoleRunner'のインストールに失敗しました
私はテストケースを実行するためにNUnit-Consoleを使用したいとbuild.cakeスクリプトで定義しました。そうです。
#tool nuget:?package=NUnit.ConsoleRunner
私はCakeスクリプトを実行すると次のエラーが発生します。
Preparing to run build script...
VERBOSE: Restoring tools from NuGet...
VERBOSE: Feeds used:
C:\Users\bergkar\.nuget\packages\
All packages listed in C:\dev\Xamarin\fleetboard-core-library\tools\packages.config are already installed.
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Unable to find package 'NUnit.ConsoleRunner'
NuGet exited with 1
Could not find any relevant files for tool 'NUnit.ConsoleRunner'. Perhaps you need an include parameter?
Error: Failed to install tool 'NUnit.ConsoleRunner'.
特定のバージョンを追加すると、以下のように使用したい場合はすべて正常に動作します。
#tool nuget:?package=NUnit.ConsoleRunner&version=3.7.0
誰かがバージョンのものがなくても動作しない理由を教えてもらえますか?で
私は次の出力を得る "\ build.ps1 -verbosity診断。":
Preparing to run build script...
Running build script...
Module directory does not exist.
Analyzing build script...
Analyzing C:/dev/Xamarin/fleetboard-core-library/build.cake...
Processing build script...
Installing tools...
Installing NuGet package NUnit.ConsoleRunner...
Executing: "C:/dev/Xamarin/fleetboard-core-library/tools/nuget.exe" install "NUnit.ConsoleRunner" -OutputDirectory "C:/d
ev/Xamarin/fleetboard-core-library/tools" -ExcludeVersion -NonInteractive
Unable to find package 'NUnit.ConsoleRunner'
NuGet exited with 1
Feeds used:
Output:
Feeds used:
Could not find any relevant files for tool 'NUnit.ConsoleRunner'. Perhaps you need an include parameter?
Error: Cake.Core.CakeException: Failed to install tool 'NUnit.ConsoleRunner'.
at Cake.Core.Scripting.ScriptProcessor.InstallTools(ScriptAnalyzerResult analyzerResult, DirectoryPath installPath)
at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
at Cake.Commands.BuildCommand.Execute(CakeOptions options)
at Cake.CakeApplication.Run(CakeOptions options)
at Cake.Program.Main()
診断の冗長性を持ってケーキを起動するとどうなりますか? nuget.exeがどのように呼び出されているかを確認することができます。https://stackoverflow.com/questions/38658660/how-to-enable-diagnostic-verbosity-for-cake – devlead
上記を参照して、元の質問に出力を追加しました – Pepper
どのバージョンのNuGet exe?パッケージを解決できないのはそのためです。それにもかかわらず、再現可能なビルドでは、バージョンを固定することをお勧めします。 – devlead