Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workaround found] NuGet errors in Windows build: NU1101 No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages #155

Closed
csinkers opened this issue Dec 18, 2020 · 17 comments
Assignees
Labels
bug Something isn't working external Unexpected behavior was caused by external problems

Comments

@csinkers
Copy link

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

@Cyberboss
Copy link

Been having this issue since Monday (the 14th) at least

@GewoonJaap
Copy link

I updated a few of my nuGet packages, build worked, rerun the build, it failed. Hmm. Somesort of caching issue?

@GewoonJaap
Copy link

GewoonJaap commented 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

Cyberboss added a commit to tgstation/tgstation-server that referenced this issue Dec 19, 2020
@Cyberboss
Copy link

run: dotnet clean ./Bumbo-Web/Bumbo-Web.sln --configuration Release && dotnet nuget locals all --clear

Seems to have worked, thank you kindly.

csinkers added a commit to csinkers/ualbion that referenced this issue Dec 20, 2020
@csinkers
Copy link
Author

Looks like that did the trick, nice one!

@csinkers csinkers changed the title NuGet errors in Windows build: NU1101 No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages [Workaround found] NuGet errors in Windows build: NU1101 No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages Dec 20, 2020
Viir added a commit to pine-vm/pine that referenced this issue Dec 21, 2020
Avoid these errors that recently started appearing in GitHub actions Windows environment:

```
[...]
D:\a\elm-fullstack\elm-fullstack\implement\PersistentProcess\PersistentProcess.WebHost\PersistentProcess.WebHost.csproj : error NU1101: Unable to find package Mono.Posix.NETStandard. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages [D:\a\elm-fullstack\elm-fullstack\implement\test-elm-fullstack\test-elm-fullstack.csproj]
34D:\a\elm-fullstack\elm-fullstack\implement\PersistentProcess\PersistentProcess.WebHost\PersistentProcess.WebHost.csproj : error NU1102: Unable to find package System.Collections.Immutable with version (>= 1.7.1) [D:\a\elm-fullstack\elm-fullstack\implement\test-elm-fullstack\test-elm-fullstack.csproj]
35D:\a\elm-fullstack\elm-fullstack\implement\PersistentProcess\PersistentProcess.WebHost\PersistentProcess.WebHost.csproj : error NU1102: - Found 2 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 1.2.0 ] [D:\a\elm-fullstack\elm-fullstack\implement\test-elm-fullstack\test-elm-fullstack.csproj]
36Error: Process completed with exit code 1.
```

Integrate the workaround discovered by Jordan Brown, Gewoon Jaap, et al.

For context, see:

+ actions/setup-dotnet#155
+ actions/runner-images#1891
zhouqingqing added a commit to zhouqingqing/qpmodel that referenced this issue Dec 21, 2020
Noggog added a commit to Mutagen-Modding/Mutagen that referenced this issue Dec 24, 2020
Ilia-Kosenkov added a commit to Ilia-Kosenkov/Backports that referenced this issue Dec 24, 2020
poveden pushed a commit to poveden/EliteChroma that referenced this issue Jan 2, 2021
oformaniuk added a commit to Handlebars-Net/Handlebars.Net.Extension.NewtonsoftJson that referenced this issue Jan 3, 2021
zaaml added a commit to zaaml/lib that referenced this issue Jan 4, 2021
database64128 added a commit to database64128/shadowsocks-uri-generator that referenced this issue Jan 13, 2021
jasonleenaylor added a commit to sillsdev/DesktopAnalytics.net that referenced this issue Apr 7, 2021
jasonleenaylor added a commit to sillsdev/DesktopAnalytics.net that referenced this issue Apr 7, 2021
@jasonleenaylor
Copy link

The workaround doesn't seem to be working for me.

Have you tried the nuget.config workaround? From what I see in your commits you tried the other workaround that clears the local cache.

The workaround doesn't seem to be working for me.

Have you tried the nuget.config workaround? From what I see in your commits you tried the other workaround that clears the local cache.

Yes that works. Thank you @GGG-KILLER !

nemesv added a commit to SpecFlowOSS/SpecFlow.Rider that referenced this issue Apr 8, 2021
@vsafonkin
Copy link

@jasonleenaylor, also you can try this step as workaround:

- run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org --configfile $env:APPDATA\NuGet\NuGet.Config

jasonleenaylor added a commit to sillsdev/DesktopAnalytics.net that referenced this issue Apr 8, 2021
lzinga added a commit to lzinga/AutoWeb that referenced this issue Apr 8, 2021
nemesv added a commit to SpecFlowOSS/SpecFlow.Rider that referenced this issue Apr 9, 2021
meinname referenced this issue in openbullet/OpenBullet2 Apr 9, 2021
skst added a commit to skst/CalculateX that referenced this issue Apr 11, 2021
skst added a commit to skst/CalculateX that referenced this issue Apr 11, 2021
carlopantaleo added a commit to carlopantaleo/PLists that referenced this issue Apr 13, 2021
kelleyma49 added a commit to kelleyma49/PSFzf that referenced this issue Apr 30, 2021
kelleyma49 added a commit to kelleyma49/PSFzf that referenced this issue Apr 30, 2021
* Workaround for build error

- borrowed from actions/setup-dotnet#155
FlyveHest pushed a commit to FlyveHest/godot_voxel that referenced this issue May 8, 2021
…the Windows images being used to build.

More information in this thread: actions/setup-dotnet#155 (comment)
martijnvanschie added a commit to martijnvanschie/azure-utilities-eventgrid that referenced this issue Apr 4, 2022
scotternst59 added a commit to scotternst59/dotnet-and-angular-functions-framework that referenced this issue Sep 29, 2022
Fixes flakiness in Windows build

See actions/setup-dotnet#155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Unexpected behavior was caused by external problems
Projects
None yet
Development

No branches or pull requests

7 participants