CoderDennis
CoderDennis

Reputation: 13837

How do I Install Cake.CoreCLR NuGet package to my tools folder?

Step 1 of this answer says Install Cake.CoreCLR NuGet package to your tools folder. How do I do that?

Things I've tried:

> dotnet add package Cake.CoreCLR --version 0.38.4
Could not find any project in `current folder`.
Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>

and

> dotnet tool install Cake.CoreCLR --version 0.38.4 -g
error NU1212: Invalid project-package combination for Cake.CoreCLR 0.38.4. DotnetToolReference project style can only contain references of the DotnetTool type
The tool package could not be restored.
Tool 'cake.coreclr' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

Upvotes: 0

Views: 1160

Answers (2)

C. Augusto Proiete
C. Augusto Proiete

Reputation: 27818

If you are using the Cake extension for Visual Studio Code v1.0+, you can install Cake.CoreCLR by running a command:

  • CTRL + Shift + P (or Command + Shift + P on Mac OSX)
  • Choose Cake: Install debug dependencies
  • And then choose Cake runner for .NET Core

This will install Cake.CoreCLR to your Cake tools folder.

Cake: Install debug dependencies

Cake runner for .NET Core

Upvotes: 0

Pascal Berger
Pascal Berger

Reputation: 4342

For running Cake on .NET Core we suggest using the .NET Core tool, installed as a local tool manifest:

dotnet new tool-manifest
dotnet tool install Cake.Tool --version 0.38.4

Afterwards you need to restore the tool:

dotnet tool restore

And can run it using dotnet:

dotnet cake

See Bootstrapping for .NET Core Tool for details.

Upvotes: 3

Related Questions