[Workaround found] NuGet errors in Windows build: NU1101 No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
See original GitHub issueDescription
I recently started getting failures in the Windows build for the dotnet action of my project, see https://github.com/csinkers/ualbion/runs/1574151895
Linux and macOS are still working fine, no project files / NuGet configurations have been changed since the last successful build. Sounds like it’s only looking for locally cached packages rather than using nuget.org.
Details
Yaml:
name: .NET Core
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
- name: Build with dotnet
run: dotnet build --configuration Release src/UAlbion/UAlbion.csproj
- name: Test with dotnet
run: dotnet test ./src/ualbion.sln --configuration Release
Platform: windows-latest Version: .NET Core 3.1.100 Action link: https://github.com/csinkers/ualbion/actions Error messages:
D:\a\ualbion\ualbion\src\Core\UAlbion.Core.csproj : error NU1101: Unable to find package SerdesNet. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages [D:\a\ualbion\ualbion\src\UAlbion\UAlbion.csproj]
D:\a\ualbion\ualbion\src\Core\UAlbion.Core.csproj : error NU1101: Unable to find package Microsoft.CodeAnalysis.FxCopAnalyzers. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages [D:\a\ualbion\ualbion\src\UAlbion\UAlbion.csproj]
D:\a\ualbion\ualbion\src\Core\UAlbion.Core.csproj : error NU1101: Unable to find package System.Memory. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages [D:\a\ualbion\ualbion\src\UAlbion\UAlbion.csproj]
D:\a\ualbion\ualbion\src\Core\UAlbion.Core.csproj : error NU1102: Unable to find package Newtonsoft.Json with version (>= 12.0.2) [D:\a\ualbion\ualbion\src\UAlbion\UAlbion.csproj]
Was this a regression from previous behavior? – Yes
Issue Analytics
- State:
- Created 3 years ago
- Reactions:25
- Comments:17 (3 by maintainers)
Top Results From Across the Web
NuGet Error NU1101 - Microsoft Learn
Solution. Examine the project's dependencies in Visual Studio to be sure you're using the correct package identifier and version number. Check ...
Read more >how to resolve "Unable to find package" nuget error
First go to in Visual Studio 2019, Tools>Nuget Package ... No packages exist with this id in source(s): Microsoft Visual Studio Offline ......
Read more >Fix error NU1101: Unable to find package. No packages exist ...
Fix error NU1101 : Unable to find package. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages.
Read more >Error NU1101: Unable to find package. No packages exist ...
The deployment fails at the dotnet publish step where dotnet is falling back to using offline package sources and subsequently throwing an error...
Read more >Solving the error: “No packages exist with this id” in Visual ...
1. Go to Visual Studio (with a project opened) · 2. Right click on the project and click “Manage nuget packages“ · 3....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found the fix, add this before the build (Ofcourse change the bumbo-web stuff to your own projectfolder/name): - name: Clean run: dotnet clean ./Bumbo-Web/Bumbo-Web.sln --configuration Release && dotnet nuget locals all --clear
Another thing that solved the issue for me was adding a
nuget.config
with the following to my project’s root: