-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Mac agent unable to restore nuget packages. #5768
Comments
Same is happening to my team. The last image version (20220605.1) was working successfully |
Same issue is happening to our project. And my workaround below that add a step...
|
@keiji could you please let us know where we need to add this.
|
@uragonda-rajesh
We can add Nuget repository url to NuGet.Config.
|
If it is from the pipeline yml could you please elaborate, also can you provide the modified Nuget.Config file? |
@uragonda-rajesh NuGet.Config structure is not complicated. You can create NuGet.Config easily 😃 And my workaround is just temporary. |
@uragonda-rajesh Hi! Thanks! We will take a look. |
Same isssue is happening to my team. We are building using Github Actions. |
The same is happening with our projects too. When can we expect a fix for this? We are stuck because of this issue. |
And I have removed |
@miketimofeev thank you for the solution. This is working. |
This workaround works: Original post: |
@miketimofeev Thank for solution. Now we We are able to generate build using macos-latest |
Thanks, it worked. |
We will deploy new images with the fix in the next 2-3 business days. |
@miketimofeev |
@erdembayar correct, but the empty config file is being created after any powershell module installation, for example, |
Is it the one https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-8.0.0? What happens if you try previous version like 7.0? Does it non-empty nuget.config file? |
@erdembayar, @zivkan: The nuget.config file is created by PackageManagement module.
Info:
DefaultConfig - https://github.com/OneGet/NuGetProvider/blob/16519ed5cbbae967a1aeaa383614bcb4505f46ab/NugetLightRequest.cs#L85:
|
@miketimofeev The bash commands just helped unblock a restore and build for me. +1 |
@al-cheb When I test (on Windows) with PowerShell Core 7.2.4 (and I don't know what OneGet is, but someone should report to them that they're creating a different default to the official NuGet client, and this is causing customer problems. For what it's worth, I recommend to EVERYONE to use |
I see that OneGet is a microsoft repo, and that in April someone created a pull request to improve the default: OneGet/NuGetProvider#66 I'm going to start an internal email thread trying to get more traction on this. If there's anyone in GitHub or Azure DevOps who wants to me included, ping me on Teams and I'll add you to the email. |
@zivkan , I can easily reproduce as well on Windows:
info:
|
Has been deployed. |
@zivkan I noticed that the PR that you mentioned in the OneGet repository has been merged. Do you know if there is going to be a new release? |
Eventually, yes, I'm sure there will be. But it's complicated. The PR I linked to is for a module called PackageManagement, and the version with the fix is here: https://www.powershellgallery.com/packages/PackageManagement/1.4.8. Notice how it says the package is unlisted. More on that below. However, when I looked at PowerShell Core's repo for the dependabot upgrade of this module, I found this: PowerShell/PowerShell#17606 So now the process is:
So, at this time, you're best off following the PowerShell repo. For what it's worth, I'm not going to be following up on this myself, and since pwsh is open on github, you can follow it as easily as I can. Note that the above is only for PowerShell Core (pwsh). For Windows PowerShell (powershell.exe), it turns out a completely different team in Microsoft manage it (some team in Windows servicing). I've been super busy this week and haven't had time to follow up, but now that I learned that PackageManagement has a bug, I'll just wait for that to be fixed first. It's highly likely that PowerShell Core is going to update before Windows PowerShell (after all, WinPS needs a Windows Update), so my best suggestion is to try to migrate off Windows PowerShell onto PowerShell Core, where possible. But this issue is about Mac agents, so WinPS is out of scope anyway. I still HIGHLY recommend everyone run |
Description
We recently see the image version is update to '20220614.2' and from then we see the nuget package failures.
Platforms affected
Virtual environments affected
Image version and build link
Environment: macos-11
Version: 20220614.2
Is it regression?
Yes. Build was successful in image version 20220605.1
Expected behavior
Build should be successful with any issues.
Actual behavior
Failed to restore nuget packages.
Repro steps
I just ran the build, no specific steps followed.
The text was updated successfully, but these errors were encountered: