Questions tagged [nuget-cli]

18 questions
31
votes
4 answers

Error NU5012 - nuget pack unable to find path (/bin/release/MyProject/bin/release)

I'm trying to update my nuget package by running the command nuget pack -properties Configuration=Release but this gives me the following error: Unable to find 'bin/Release/{project-name}/bin/Release'. Mae sure the project has been built I'm not…
Detilium
  • 2,868
  • 9
  • 30
  • 65
7
votes
3 answers

How to restore assemblies from a NuGet package for a specific target framework only

I'm looking for a way to restore the assemblies for a NuGet package which targets exactly one framework, in this case net45. This is my packages config:
Bobby Tables
  • 2,953
  • 7
  • 29
  • 53
3
votes
1 answer

How to update multiple packages to a desired version in single nuget cli command?

From Nuget CLI is it possible from a single command to upgrade multiple packages to the desired version? I know we can do nuget.exe update "FooBar.sln" MyPackage -Version 1.0 but what if I want to update 2 packages to 1.0? This still updates to…
Nikhil Agrawal
  • 47,018
  • 22
  • 121
  • 208
2
votes
5 answers

Why does calling "get-help entityframework" in the Package Manager Console cause this error?

PM> get-help entityframework get-help : Object reference not set to an instance of an object. At line:1 char:1 + get-help entityframework + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-Help],…
2
votes
1 answer

Access Is Denied error pushing package into my azure devops artifacts nuget feed

In my question here I managed to push one package to my feed, however I now get an Access is denied error. According to this question I should be prompted for user name and password. This did occur for the package I managed to push, but it no…
Kirsten
  • 15,730
  • 41
  • 179
  • 318
2
votes
1 answer

How I can set nuget package allowedversion only at solution level?

I use VS 2015 and .net 4.5 web project with 15 project. I use by example a package in a couple of projects of my solution and each time I need to change the version for a specific version I need to open the package.config for each projects add…
jboo
  • 364
  • 6
  • 14
2
votes
0 answers

nuget install does not get dependencies inside dependent packages

I'm using NuGet CLI tool to manage package dependencies in a non-VisualStudio environment. Is there a way to use the packages.config file with the command install and get all dependencies that the listed dependencies in the packages.config file…
Jan Lovstrand
  • 228
  • 2
  • 9
1
vote
1 answer

How to publish a nuget prerelease package to a feed?

I am manually pushing nuget packages to Azure Devops feed by running nuget.exe push command. When I build my project, the AssemblyName.1.0.0.nupkg file is created and I am pushing it as: nuget.exe push -Source URL -ApiKey key…
MAK
  • 1,915
  • 4
  • 20
  • 44
1
vote
1 answer

uninstall / Install Nuget Package across multiple solutions and projects

How do I uninstall a package by id and version for all solutions and projects under a folder? How do I install a package by id and version for all solutions and projects under a directory? There is a package manager approach with somewhat Similar…
Cannon
  • 2,725
  • 10
  • 45
  • 86
1
vote
0 answers

NuGet Install Matching Pattern Version

How do you install a nuget package with a matching pattern: For example, I want nuget to get any version matching the pattern 1.0.0* (1.1.0-rc, 1.1.0.1, etc...). But nuget doesn't support the wildcard character, I get an error '1.1.0*' is not a…
Alex Weitz
  • 3,199
  • 4
  • 34
  • 57
1
vote
1 answer

Nuget CLI not available even with VS 2017 RC3

The Nuget Distribution pages states: NuGet 4.x is included in the Visual Studio 2017 installation. Latest NuGet releases are delivered as part of Visual Studio updates. Batteries are included! It seems those batteries are flat. In both Package…
ProfK
  • 49,207
  • 121
  • 399
  • 775
0
votes
0 answers

Restoing nuget using nuget.exe in jenkins pipeline giving some incorrect error log

Before Update to .net6 - I have projects in my solution which consist of .netstandard2.1, .netframeword4.8 and .netcore3.1 projects. I this case I dont have any problems. I have a script to restore nugets in build server which uses nuget.exe and its…
0
votes
0 answers

Update Nuget Packages from a specific source via command line

I'm trying to write a script that updates certain nugets in a visual studio Solution. For that I'm using the Nuget CLI (https://learn.microsoft.com/en-us/nuget/reference/nuget-exe-cli-reference#restore) According to the documentation I cam up with…
Hans Vader
  • 183
  • 10
0
votes
0 answers

How do I get the version of a Specific Installed Nuget package using Nuget.exe?

I am building a Selenium/Specflow project in Jenkins and would like to get the currently installed version of the NUnit Console Runner package via the Nuget.exe CLI. I have to reference the NUnit Console Runner package folder path in my Jenkins…
J.R. Bye
  • 98
  • 2
  • 12
0
votes
1 answer

How to delete a NuGet library

I've accidentally created a library in NuGet and want to delete it (so far, nobody has downloaded it). I've installed the NuGet CLI, and tried the following command: nuget delete mynugetlibrary 1.0 -source nuget.org When I do this, it asks me for a…
user10780967
1
2