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

[Bug]: dotnet restore --interactive from Azure Artifacts feed won't restore unless the package is already in local cache #11011

Closed
burtonrodman opened this issue Jul 9, 2021 · 6 comments

Comments

@burtonrodman
Copy link

burtonrodman commented Jul 9, 2021

NuGet Product Used

dotnet.exe, Visual Studio Package Management UI

Product Version

dotnet 5.0.301

Worked before?

No response

Impact

It's more difficult to complete my work

Repro Steps & Context

  1. publish a package to an Azure Artifacts feed (include upstream)
  2. set feed in nuget.config in solution root (clear all others) -- (btw, I have multiple solutions using package)
  3. dotnet restore --interactive -- the first time this authenticates using device login flow and restores
  4. install package in project - dotnet package add MyPackage
  5. publish updated version to the feed
  6. in vscode, manually update the version number in the csproj file and build
  7. the build will fail during restore. error indicates new package version is found in feed index, but is not in local cache
  8. undo csproj change and open the solution in Visual Studio
  9. open NuGet Package Manager UI and update the package -- this works every time.
  10. open other solutions with this package referenced in vscode
  11. manually update version in csproj and project will build without errors

Verbose Logs

No response

@burtonrodman
Copy link
Author

burtonrodman commented Jul 9, 2021

i will post full error log the next time it happens (likely tomorrow). this has occurred on multiple Azure DevOps tenants, multiple computers and multiple of my Microsoft personal and work/school accounts. It is also happening for my entire work team (4 separate work/school accounts). various machines have 3.1.40x, 5.x and 6.0.100-preview.5 sdks. the projects experiencing it are targeting netcoreapp3.1

@heng-liu
Copy link
Contributor

Hi @burtonrodman, may I know if any of the following workarounds work for you?
1.Clear the http cache before build: dotnet nuget locals http-cache --clear
2.Run dotnet restore with --no-cache
If yes, then this is a duplicate of #3116
If not, could you please send the detailed error message? (--verbosity d) Thanks!

@heng-liu heng-liu added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Jul 13, 2021
@burtonrodman
Copy link
Author

thanks for these suggestions. unfortunately, the issue has not reoccurred since my report. i have asked my team to do these things if they see it again.

@ghost ghost added WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Jul 13, 2021
@heng-liu heng-liu added WaitingForCustomer Applied when a NuGet triage person needs more info from the OP and removed WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. labels Jul 13, 2021
@zkat
Copy link
Contributor

zkat commented Jul 19, 2021

Closing because it doesn't seem to repro anymore. Feel free to file a new issue if you see this again!

@zkat zkat closed this as completed Jul 19, 2021
@sandaluz-aptera
Copy link

sandaluz-aptera commented Jul 20, 2021

> Executing task: C:\Program Files\dotnet\dotnet.exe build /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <

Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
C:\Projects\*****\management-portal-api\ManagementPortalApi\ManagementPortalApi.csproj : warning NU1603: Microsoft.AspNetCore.OData 7.5.8 depends on Newtonsoft.Json (>= 10.0.3) but Newtonsoft.Json 10.0.3 was not found. An approximate best match of Newtonsoft.Json 11.0.2 was resolved. [C:\Projects\*******\management-portal-api\ManagementPortalApi.sln]
C:\Projects\*******\management-portal-api\ManagementPortalApi.Tests\ManagementPortalApi.Tests.csproj : warning NU1603: Microsoft.AspNetCore.OData 7.5.8 depends on Newtonsoft.Json (>= 10.0.3) but Newtonsoft.Json 10.0.3 was not found. An approximate best match of Newtonsoft.Json 11.0.2 was resolved. [C:\Projects\*******\management-portal-api\ManagementPortalApi.sln]
C:\Projects\*******\management-portal-api\ManagementPortalApi.Tests\ManagementPortalApi.Tests.csproj : error NU1102: Unable to find package *******.*******.Data with version 
(>= 1.0.3870) [C:\Projects\*******\management-portal-api\ManagementPortalApi.sln]
C:\Projects\*******\management-portal-api\ManagementPortalApi.Tests\ManagementPortalApi.Tests.csproj : error NU1102:   - Found 19 version(s) in *******-devops [ Nearest version: 1.0.3864 ] [C:\Projects\*******\management-portal-api\ManagementPortalApi.sln]
C:\Projects\*******\management-portal-api\ManagementPortalApi\ManagementPortalApi.csproj : error NU1102: Unable to find package *******.*******.Data with version (>= 1.0.3870) [C:\Projects\*******\management-portal-api\ManagementPortalApi.sln]
C:\Projects\*******\management-portal-api\ManagementPortalApi\ManagementPortalApi.csproj : error NU1102:   - Found 19 version(s) in *******-devops [ Nearest version: 1.0.3864 ] [C:\Projects\*******\management-portal-api\ManagementPortalApi.sln]
  Failed to restore C:\Projects\*******\management-portal-api\ManagementPortalApi\ManagementPortalApi.csproj (in 933 ms).
  Failed to restore C:\Projects\*******\management-portal-api\ManagementPortalApi.Tests\ManagementPortalApi.Tests.csproj (in 933 ms).
The terminal process "C:\Program Files\dotnet\dotnet.exe 'build', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

@burtonrodman
Copy link
Author

burtonrodman commented Jul 20, 2021

@heng-liu EDIT: after running the provide commands, the package restored correctly

@heng-liu heng-liu reopened this Jul 22, 2021
@ghost ghost removed the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants