error NU1102: Unable to find package Npgsql with version (>= 99.0.0) means the package exists, but no source you restore from has a version that satisfies the one you asked for. The line under it names the Nearest version; reference a version that exists and restore again.

The quickest fix is dotnet add package Npgsql with no version: it rewrites the existing reference to the latest stable release. To pick a specific one, list them first with dotnet package search Npgsql --exact-match.

The error

...\NuLab\NuLab.csproj : error NU1102: Unable to find package Npgsql with version (>= 99.0.0)
...\NuLab\NuLab.csproj : error NU1102:   - Found 192 version(s) in nuget.org [ Nearest version: 10.0.3 ]
...\NuLab\NuLab.csproj : error NU1102:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
...\NuLab\NuLab.csproj : error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\library-packs
  Failed to restore ...\NuLab\NuLab.csproj (in 226 ms).

That is dotnet build with the version already in the project file. Asking dotnet add package Npgsql --version 99.0.0 for it prints the same lines without the project prefix, plus a misleading last line, and leaves the project file unchanged:

error: Package 'Npgsql' is incompatible with 'all' frameworks in project '...\NuLab\NuLab.csproj'.

Why it happens

A plain version in a PackageReference is a minimum, which is why the message prints >= 99.0.0: NuGet looks for that version or the lowest one above it. Restore asks every configured source and reports each one: here nuget.org had versions, but none that high, and the two local folders, the Visual Studio offline packages and the SDK's own library-packs, had none at all. Restore fails, so the build stops before compiling anything. The "incompatible with 'all' frameworks" line from dotnet add package is a side effect of that failed restore, not a framework problem.

In real projects the requested version is usually a typo, a version copied from a newer guide than the packages on your feed, or a release that exists only on a private feed this machine is not configured for. A misspelt package id gives a different code, NU1101, and the per-source lines disappear:

...\NuLab\NuLab.csproj : error NU1101: Unable to find package Npsgql. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org

The fix

PS> dotnet package search Npgsql --exact-match
| Npgsql     | 10.0.2   |        | N/A             |
| ---------- | -------- | ------ | --------------- |
| Npgsql     | 10.0.3   |        | N/A             |
PS> dotnet add package Npgsql
info : PackageReference for package 'Npgsql' version '10.0.3' updated in file '...\NuLab\NuLab.csproj'.
PS> dotnet build
Build succeeded.

The search output is shortened to its last rows; it lists stable versions oldest first, and --prerelease adds previews. The add command found the existing reference and replaced its version, so the project file now reads:

<PackageReference Include="Npgsql" Version="10.0.3" />

Editing the version by hand works just as well. For NU1101, correct the id, and check a guessed id with the same search command before you restore it: a misspelt name can belong to someone else's package.

How it was reproduced

A dotnet new console project with <PackageReference Include="Npgsql" Version="99.0.0" />, then dotnet build; then dotnet add package Npgsql --version 99.0.0 on a clean project file; then the id misspelt as Npsgql, which the search command had confirmed does not exist on nuget.org. .NET SDK 10.0.402 on Windows 11, sources nuget.org and the Visual Studio offline folder; Npgsql 10.0.3 was the latest stable release on October 22, 2026.

Frequently asked

What does NU1102 Unable to find package with version mean?
The package id exists on at least one source, but no source has a version that satisfies the requested one. A plain version in a PackageReference is a minimum, so the message shows it as >= 99.0.0. The next lines list each source with the nearest version it has.
What is the difference between NU1101 and NU1102?
NU1101 means no configured source has a package with that id at all, usually a misspelt name or a missing private feed. NU1102 means the id was found but not the version you asked for.
How do I list the versions of a NuGet package from the command line?
On the .NET 10 SDK run dotnet package search followed by the package id and --exact-match. It lists every stable version per source, oldest first; add --prerelease to include previews. dotnet add package with no version picks the latest stable one for you.

More decoded errors in the Fixes category. NU1102 on dotnet publish for a runtime pack has a different cause, covered in the MAUI publish post.