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

"error NU1605: Detected package downgrade" when restoring packages for runtime linux-arm #467

Closed
hickford opened this issue Sep 26, 2021 · 2 comments

Comments

@hickford
Copy link
Contributor

hickford commented Sep 26, 2021

Hi. I tried to build for linux-arm but got an error when restoring packages dotnet restore -r linux-arm

Determining projects to restore...
/home/matthickford/Git-Credential-Manager-Core/src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj : error NU1605: Detected package downgrade: Microsoft.Win32.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version. [/home/matthickford/Git-Credential-Manager-Core/Git-Credential-Manager.sln]
...
Failed to restore /home/matthickford/Git-Credential-Manager-Core/src/shared/GitHub.Tests/GitHub.Tests.csproj (in 784 ms).
Failed to restore /home/matthickford/Git-Credential-Manager-Core/src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj (in 782 ms).
Failed to restore /home/matthickford/Git-Credential-Manager-Core/src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj (in 812 ms).
Failed to restore /home/matthickford/Git-Credential-Manager-Core/src/shared/Microsoft.Git.CredentialManager.Tests/Microsoft.Git.CredentialManager.Tests.csproj (in 812 ms).
10 of 14 projects are up-to-date for restore.

Full log attached. restore.txt

This happened with .NET 5.0.400 and GCM Core source v2.0.498 . I'm cross compiling from a faster debian.10-x64 computer. dotnet restore worked as expected, though dotnet restore -r linux-64 failed with the same error as above.

@hickford hickford changed the title "error NU1605: Detected package downgrade" when dotnet restore -r linux-arm "error NU1605: Detected package downgrade" when restoring packages for runtime linux-arm Sep 26, 2021
@hickford
Copy link
Contributor Author

Workaround: remove these packages from solution. This is okay since they are all non-vital test packages.

dotnet sln Git-Credential-Manager.sln remove src/shared/Microsoft.AzureRepos.Tests/Microsoft.AzureRepos.Tests.csproj
dotnet sln Git-Credential-Manager.sln remove src/shared/Microsoft.Git.CredentialManager.Tests/Microsoft.Git.CredentialManager.Tests.csproj
dotnet sln Git-Credential-Manager.sln remove src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj
dotnet sln Git-Credential-Manager.sln remove src/shared/GitHub.Tests/GitHub.Tests.csproj

@hickford
Copy link
Contributor Author

I'm cross compiling from a faster debian.10-x64 computer. dotnet restore worked as expected, though dotnet restore -r linux-64 failed with the same error as above.

I installed the arm32 dotnet sdk on the Raspberry Pi, and dotnet restore worked successfully, so this must be some upstream issue concerning dotnet restore --runtime, perhaps dotnet/sdk#9518

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

1 participant