Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

832
Views
Azure devops: error NU1101: Unable to find package xxx. No packages exist with this id in source(s): nuget.org

I have a package I push to a private nuget feed. Then a few other projects reference these packages. All is good, except when I specify a wildcard, that only works in vs, but apparently not when restoring via an azure devops build:

this works:

<PackageReference Include="MyLibPackage" Version="1.0.0.114" />

but I get the unable to find package error on:

<PackageReference Include="MyLibPackage" Version="*" />

snippet of the dockerfile the restore task in azure devops runs:

# Install the Credential Provider to configure the access
RUN wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash

# Configure the environment variables
ENV NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED true
ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS "{\"endpointCredentials\": [{\"endpoint\":\"$feed\", \"password\":\"$pat\"}]}"

WORKDIR /src

COPY ["MyProject/MyProject.csproj", "MyProject/"]

RUN dotnet restore -s "$feed" "MyProject/MyProject.csproj"
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Azure devops: error NU1101: Unable to find package xxx. No packages exist with this id in source(s): nuget.org

I do not have much experience with Docker, I am not sure if this issue comes from docker container or dotnet restore itself.

But since you said in the comment:

Basically everyting except a hard version number fails.

So, I would like provide a workaround to resolve this issue, you can check if it works for you:

Since we have to use the hard version number, we could add one more command to update the package to the latest version, the command line like following:

RUN dotnet add package MyLibPackage -s "$feed"

And set the WORKDIR in the dockerfile where the project file is.

@Elger Mensonides, Thanks for Elger`s contribution for the correct command line.

If we do not specify the version in the command line, it will add the latest package to the project.

Check the document dotnet CLI – how to update a NuGet package and add a new NuGet package for some details.

Hope this can helps.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!