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.

[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 issue

Description

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:closed
  • Created 3 years ago
  • Reactions:25
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

31reactions
GewoonJaapcommented, Dec 19, 2020

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

19reactions
GGG-KILLERcommented, Jan 15, 2021

Another thing that solved the issue for me was adding a nuget.config with the following to my project’s root:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>
Read more comments on GitHub >

github_iconTop 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 >

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