nuget install command line "Unable To Resolve Dependency" error

695 views Asked by At

I'm running the following nuget install command line command (indented for ease of reading)

nuget.exe install 
    "Microsoft.Azure.WebJobs.Extensions.OpenApi" 
    -Version 1.4.0 -Source [our internal feed source] 
    -Framework "net6.0"
    -OutputDirectory "packages"
    -NonInteractive

And it's reporting:

Unable to resolve dependency 'Microsoft.Azure.WebJobs.Script.Abstractions'

The package Microsoft.Azure.WebJobs.Script.Abstractions appears to exist when I browse to in in nuget package manager, and I'm using the the version of nuget.exe (6.2.1.2 at the time of writing).

1

There are 1 answers

0
James Wiseman On

The problem was that the dependency was a pre-release version.

Stipulating the -prerelease command-line flag fixed this issue.

https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-install