error NU1101: Unable to find package Newtonsoft.Jsonn. No packages exist with this id in source(s): ... nuget.org means NuGet asked every source in the list and none of them has a package with that id at all, in any version. Either the id is misspelled, or the package lives on a feed your project has not been told about.

Read the id in the message letter by letter and correct it in the .csproj. If the id is right, look at the list after "source(s)": if your company feed or local folder is not in it, add it with a nuget.config next to the project and build again.

The error

  Determining projects to restore...
...\FixLab\FixLab.csproj : error NU1101: Unable to find package Newtonsoft.Jsonn. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org
...\FixLab\FixLab.csproj : error NU1101: Unable to find package Contoso.Shared. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org
  Failed to restore ...\FixLab\FixLab.csproj (in 542 ms).

Build FAILED.

The project path is shortened; nothing else in the output was changed.

Why it happens

Restore takes each PackageReference and asks every configured source for the list of versions of that id. NU1101 is the answer when every source says the id does not exist. That is different from NU1102, where the id exists but not in the version you asked for. The first line above comes from one extra letter in Newtonsoft.Json; nuget.org answered NotFound for newtonsoft.jsonn and restore stopped.

The second line is the other cause. Contoso.Shared is a real package, packed into a local folder, but the sources in the message are only the SDK's library packs, the Visual Studio offline folder and nuget.org. Restore never looked in the folder that holds the package, because no configuration names it. The message always names the sources it searched, so it tells you which case you are in.

The fix

<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Contoso.Shared" Version="1.0.0" />

The id is corrected in FixLab.csproj. For the private package, a nuget.config beside the project adds the feed:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="contoso-local" value="..\feed" />
  </packageSources>
</configuration>
dotnet build
dotnet nuget list source

The build then restored and succeeded. Run from the project folder, dotnet nuget list source listed contoso-local first, then nuget.org and Microsoft Visual Studio Offline Packages; run from a folder without the file, it listed only the last two. The project nuget.config added a source and kept the others. Commit that file with the project so every clone and the CI server see the same feed. Credentials for an authenticated feed do not belong in it. If you are unsure of an id, search nuget.org and copy the install line from the package page instead of typing it.

How it was reproduced

A dotnet new console project on .NET SDK 10.0.403 (target net10.0) with two references added by hand: Newtonsoft.Jsonn 13.0.3, a deliberate typo of Newtonsoft.Json 13.0.3, and Contoso.Shared 1.0.0, a class library packed with dotnet pack into a folder that no nuget.config listed. Correcting the id and adding the folder source fixed both. After the fix, run in the same folder against the typo, dotnet add package Newtonsoft.Jsonn --version 13.0.3 printed two errors, and the project file was the same before and after (checked with Compare-Object):

error: NU1101: Unable to find package Newtonsoft.Jsonn. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, contoso-local, Microsoft Visual Studio Offline Packages, nuget.org
error: Package 'Newtonsoft.Jsonn' is incompatible with 'all' frameworks in project '...\FixLab.csproj'.

Frequently asked

What does NU1101 unable to find package mean?
NuGet asked every configured source for the package id and none of them has it in any version. The id is misspelled, or the package is on a feed the project does not list.
What is the difference between NU1101 and NU1102?
NU1101 means no source knows the package id at all. NU1102 means the id exists but no source has the version you asked for, and it prints the nearest version it found.
How do I add a private NuGet feed to one project?
Put a nuget.config file next to the project or solution with an add element under packageSources that names the feed URL or folder, then restore again. Run dotnet nuget list source from that folder to see the sources in effect there.

More decoded errors in the Fixes category. If the id exists but the version does not, see NU1102: Unable to find package with version.