How can I use the latest version of the nuget tool when restoring the packages of a .NET 6 project? I noticed it is using old version that is preventing to restore successfully all my project packages.
Any hint is always welcome, please.
btw, On Azure DevOps, I got recommended to use:
Hi, Victor, thank you for reaching out to Atlassian Community.
In order to properly assist you, could you please share the following information with us?
What build image are you using?
Which Nuget are you using?
What error/behavior are you getting?
Thank you!
Kind regards,
Caroline
image: microsoft/dotnet:sdk
pipelines:
branches:
develop:
- step:
name: Build
caches:
- dotnetcore
script:
- dotnet restore src/solution_name.sln
- dotnet build src/solution_name.sln --no-restore --configuration Release
Images used:build : docker.io/microsoft/dotnet@sha256:4db9513d5b1bcf4b88c5700f9b831908d435d9771fd28a338b123e5ab8eec036+ dotnet restore src/solution_name.sln/opt/atlassian/pipelines/agent/build/src/project/project_name.csproj : error NU1202: Package MVCCaching.Kentico.Core 13.0.2 is not compatible with net60 (.NETFramework,Version=v6.0). Package MVCCaching.Kentico.Core 13.0.2 supports: netcoreapp3.1 (.NETCoreApp,Version=v3.1) [/opt/atlassian/pipelines/agent/build/src/solution_name.sln]Restore failed in 1.25 sec for /opt/atlassian/pipelines/agent/build/src/project/project_name.csproj./opt/atlassian/pipelines/agent/build/src/project2/project_name_2.csproj : error NU
rpc error: code = NotFound desc = failed to pull and unpack image "mcr.microsoft.com/dotnet/core/sdk:6.0": failed to resolve reference "mcr.microsoft.com/dotnet/core/sdk:6.0": mcr.microsoft.com/dotnet/core/sdk:6.0: not found
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Victor.
Thanks for getting back to us and sharing the additional information. Before we continue, I just would like to set the expectation that we are not proficient with how .Net technology works, but we will assist as best as possible from our side.
In order for us to verify if the issue is related to the Pipeline, you will need to debug the build locally and let us know the result. You can access the following link to check how to perform this test:
The error that you are getting while pulling the image mcr.microsoft.com/dotnet/core/sdk:6.0 is actually expected as the image you are specifying doesn’t exist. Could you please try to use mcr.microsoft.com/dotnet/sdk:6.0 to pull the image if you would like to use the .Net SDK 6.0 version as mentioned here?
Please let us know how it goes and don't hesitate to ask for any further information if needed.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Caroline R ,
Thank you for your help! By updating the image to the one you shared on the comment, the build of my .NET 6 project worked very good.
Thank you so much for sharing the debugging details as well. I will definitely configure it locally for tests.
Regards,
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Victor!
Thanks for getting back to us! I'm glad to know it worked :)
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.