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

Open
TomGillen opened this Issue Mar 14, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@TomGillen

TomGillen commented Mar 14, 2018

  1. Create a new project in Visual Studio 2017 15.6.2.
  2. Right click on the project and add docker support.
  3. Switch to Release, and hit compile.

The compile fails with the following:

1>Step 7/16 : RUN dotnet restore -nowarn:msb3202,nu1503
1> ---> Running in 7b165cda3f88
1>/usr/share/dotnet/sdk/2.1.101/NuGet.targets(229,5): error MSB3202: The project file "/src/docker-compose.dcproj" was not found. [/src/DockerTest.sln]
1>Service 'dockertest' failed to build: The command '/bin/sh -c dotnet restore -nowarn:msb3202,nu1503' returned a non-zero code: 1
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(111,5): error : Building dockertest
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(111,5): error : Service 'dockertest' failed to build: The command '/bin/sh -c dotnet restore -nowarn:msb3202,nu1503' returned a non-zero code: 1.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(111,5): error : 
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(111,5): error : For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting

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.

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster Mar 15, 2018

Member

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 dotnet restore to this:

dotnet restore -nowarn:msb3202,nu1503 -p:RestoreUseSkipNonexistentTargets=false

Adding RestoreUseSkipNonexistentTargets reverts NuGet to its previous behavior, in which MSB3202 is a warning which can be suppressed.

Member

natemcmaster commented Mar 15, 2018

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 dotnet restore to this:

dotnet restore -nowarn:msb3202,nu1503 -p:RestoreUseSkipNonexistentTargets=false

Adding RestoreUseSkipNonexistentTargets reverts NuGet to its previous behavior, in which MSB3202 is a warning which can be suppressed.

@elanderson

This comment has been minimized.

Show comment
Hide comment
@elanderson

elanderson Jul 11, 2018

I'm having this issue in Visual Studio 15.7.4 as well.

elanderson commented Jul 11, 2018

I'm having this issue in Visual Studio 15.7.4 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment