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

Empty NuGet.config file causing restore failures with 5.0.202 #184

Closed
2 of 5 tasks
marcpopMSFT opened this issue Apr 8, 2021 · 7 comments
Closed
2 of 5 tasks

Empty NuGet.config file causing restore failures with 5.0.202 #184

marcpopMSFT opened this issue Apr 8, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@marcpopMSFT
Copy link

Description:
I was told this might be the right repo for filing this issue. Also sent email to a few contacts at GH.

We're seeing customer reports of customers using GitHub Actions with 5.0.202 and failing to restore any files from Nuget.org. This appears to be because the machine has an empty nuget.config file picked up by the build process which causes NuGet to ignore nuget.org.

Example customer reports along with workaround
dotnet/installer#10171

NuGet change that affected this
NuGet/NuGet.Client#3907

Task version:
Unknown

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:

  • uses: actions/checkout@v2
  • name: Setup .NET
    uses: actions/setup-dotnet@v1
    with:
    dotnet-version: 5.0.x
  • name: Restore dependencies
    run: dotnet restore
  • name: Build
    run: dotnet build --no-restore
  • name: Test
    run: dotnet test --no-build --verbosity normal

Expected behavior:
Build succeeds restoring files from NuGet.org.
https://github.com/pownas/asp-net-yaml-yml-build-tester/runs/2283517744?check_suite_focus=true

Actual behavior:
error NU1101: Unable to find package Microsoft.AspNetCore.Identity.UI. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
https://github.com/pownas/asp-net-yaml-yml-build-tester/runs/2283517744?check_suite_focus=true

@marcpopMSFT marcpopMSFT added bug Something isn't working needs triage labels Apr 8, 2021
@marcpopMSFT
Copy link
Author

Sample repro from Andy. Looks like Maxim is engaged in email now.
https://github.com/zivkan/ci-nugetconfig-check/runs/2292176156?check_suite_focus=true

@maxim-lobanov
Copy link
Contributor

Related issue: actions/runner-images#3038

@samsmithnz
Copy link

I'm hitting this too. Short term workaround seems to be to use .NET 5.0.201:

    - uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 5.0.201

@vsafonkin
Copy link

PR with fix for Windows runner was merged: actions/runner-images#3144

@vsafonkin
Copy link

Related issue in choco repository: chocolatey/choco#2233

@vsafonkin
Copy link

Hi @marcpopMSFT, do you still have this issue?

@marcpopMSFT
Copy link
Author

From internal emails, I believe this has been resolved in GH actions at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants