Is there a dotnet command to download an arbitrary NuGet package without adding it to any .NET project as a dependency?

Viewed 516

Consider the following scenario: I want to convert the VS binary coverage result to XML. There is a nuget package that contains the tool I need - https://www.nuget.org/packages/Microsoft.CodeCoverage/16.5.0, but how do I download it conveniently?

I cannot use dotnet add package, because it expects a .NET Core project to which it would add the package as a NuGet dependency. This is not my case. I just want to download the package and access the executable build\netstandard1.0\CodeCoverage\CodeCoverage.exe inside the package folder.

Right now I am using my own powershell code to do just that. But I was wondering if there is some other dotnet command that I have missed?

The goal is to get back the package root folder.

EDIT 1

I only have dotnet on the machine. My custom powershell code downloads nuget.exe from the website and calls nuget install. But I would like to use dotnet command, if there is one.

0 Answers
Related