When you do dotnet restore
.NET Core quite obviously downloads NuGet packages. But I cannot find a NuGet command line utility for .NET Core (there is one for Mono, but I'm not after that).
So how do you get NuGet to work from the command line with .NET Core on Linux (outside of package restore obviously. That works out of the box).
The nuget.exe CLI, nuget.exe , is the command-line utility for Windows that provides all NuGet capabilities; it can also be run on Mac OSX and Linux using Mono with some limitations.
For . NET (including . NET Core), the Microsoft-supported mechanism for sharing code is NuGet, which defines how packages for . NET are created, hosted, and consumed, and provides the tools for each of those roles.
With recent .NET Core SDK releases, such as 1.0.0 RC4, NuGet is shipped with .NET Core. You can directly access NuGet by specifying it as a command with dotnet
:
dotnet nuget
If the version of the .NET Core SDK does not support that you could look at downloading a nightly build of NuGet v4. There is a NuGet.CommandLine.Xplat NuGet package which supports being run on .NET Core. However, you need all its dependencies in the same folder and the NuGet package does not specify them. Downloading just the NuGet.CommandLine.Xplat NuGet package will not work directly. It will show an error about missing NuGet assemblies.
Your final option, which you said you did not want to do, is to install Mono.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With