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
Release builds fail during dotnet restore #84
Comments
This error was caused by changes in NuGet between the 2.1.4 and 2.1.101 SDK. We are working on a hotfix to the aspnet-docker image which includes a workaround for this error. (see aspnet/aspnet-docker#389). In the long-run, we hope to eliminate the need to suppress MSB3202 (see #87) In the meantime, you can apply this workaround locally to unblock your builds. Change any lines with
Adding RestoreUseSkipNonexistentTargets reverts NuGet to its previous behavior, in which MSB3202 is a warning which can be suppressed. |
I'm having this issue in Visual Studio 15.7.4 as well. |
This issue is being closed as an inactive issue. If you wish to keep it active, please reply with any additional context for our consideration, we are happy to take a look! |
Hi Team, I am facing this issue when creating the image. C:\Program Files\dotnet\sdk\2.1.700\NuGet.targets(121,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\src\LearnDocker\LearnDocker.csproj] |
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed. FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1709 AS base FROM microsoft/dotnet:2.1-sdk-nanoserver-1709 AS build RUN dotnet restore -nowarn:msb3202,nu1503 -p:RestoreUseSkipNonexistentTargets=false "LearnDocker/LearnDocker.csproj" FROM build AS publish FROM base AS final |
@DotsYatin It seems like your container may have some networking issue in accessing NuGet.org. Sometimes restarting Docker Desktop fixes this? |
Facing similar issue. Restarting and re-installing Docker Desktop had no effect. https://api.nuget.org/v3/index.json is accessible via browser. I am also able to run "dotnet restore" on my project successfully. I will appreciate any help. Error Dockerfile FROM microsoft/dotnet:2.2-sdk-nanoserver-1803 AS build FROM build AS publish FROM base AS final |
@dukefox11 Is the result the same from the command line if you do "docker build"? EDIT: It could be related to proxy settings, like in here: NuGet/Home#2880 |
I was also experiencing the same issue. Used the -nowarn:msb3202,nu1503 -p:RestoreUseSkipNonexistentTargets=false flags to resolve the problem. Using Microsoft Visual Studio Enterprise 2019 - Version 16.9.5 |
The compile fails with the following:
The same error can also be reproduced in any build that attempts to build the docker image, including running
docker build
locally and on CI services such as Docker Cloud.There will also be additional errors about further missing .csproj files for each additional project in the solution, e.g. unit test projects.
The text was updated successfully, but these errors were encountered: