question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to find package spontaneous error

See original GitHub issue

Description

.Net Core 2

We’re using the Nexus OSS repository to provider our internal packages using paket. When we’re publishing a new package version and after that execute paket update the packet updates the package to the correct version (it properly see the newest version). When we open the project in Visual Studio the package (library) is marked with an yellow triangle and the following error occurs in the console:

Error NU1102: Unable to find package X with version (>= 3.1.0.5989790)

  • Found 224 version(s) in Y1 [ Nearest version: 3.1.0.5935616 ]
  • Found 0 version(s) in Y2
  • Found 0 version(s) in Y3

I was trying the “paket clear-cache” and/or delete obj folder and it sometimes helps, but sometimes not 😕

Repro steps

  1. Create a package with a version 1.0

  2. Install it in the project with paket.exe install

  3. Create a package with a version 1.1

  4. Update a package

The problem doesn’t arise always 😕

Expected behavior

Package can bee seen in the Visual Studio project

Actual behavior

Sometimes a package cannot bee seen by the Visual Studio

Known workarounds

nuget locals http-cache -clear
dotnet restore ...

Best Regards, MiloszeS

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
miloszescommented, Nov 30, 2017

VS: 14.4.5

I’ve found a workaround:

nuget locals http-cache -clear

So it looks like http-cache in the nuget is out of sync for a while. We’ve noticed the problem mostly (I had the problem only with young packages, but my collegues don’t remember which packages was problematic for them) for packages quite yound (deployed a few minutes before).

1reaction
nopara73commented, Aug 16, 2018

To save some time for some. I had to do dotnet nuget locals http-cache --clear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to resolve "Unable to find package" nuget error
Tools · Nuget Package Manager · General · Click button "Clear All Nuget Cache(s) · Package Resources and click "Update" · Woolah! Error...
Read more >
Random error NU1101: Unable to find package
Started from Dec 21 2020, we seeing random errors. error NU1101: Unable to find package XXX. No packages exist with this id in...
Read more >
[Solved] "E: Unable to locate package" Error on Ubuntu
Fixing 'Unable to locate package error' on Ubuntu · 1. Check the package name (no, seriously) · 2. Update the repository cache ·...
Read more >
NuGet Error NU1101
Examine the project's dependencies in Visual Studio to be sure you're using the correct package identifier and version number. Check your NuGet.
Read more >
Error: cannot find module [Node npm Error Solved]
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found