dockerjenkinsdotnetcorecli

dotnet restore failing with docker Jenkins container


I have a local docker image with the dotnet core 3.1 installed on the Jenkins/Jenkins:lts base image.

Running a shell script for a build configuration - I am getting an error on

> dotnet restore *.sln

/usr/share/dotnet/sdk/3.1.102/NuGet.targets(123,5): error : The file '/var/jenkins_home/.nuget/packages/microsoft.visualstudio.azure.containers.tools.targets/1.9.10/microsoft.visualstudio.azure.containers.tools.targets.nuspec' already exists.

Looking at the mount - it indeed does exist. What do I do to fix this?


Solution

  • I think you are using Docker for Desktop for Windows. I also faced the same issue. Try to downgrade the Docker for Desktop for Windows Version to Docker Desktop Community 2.1.0.5.

    Link: https://docs.docker.com/docker-for-windows/release-notes/#docker-desktop-community-2105#docker-desktop-community-2105