title: DockerFile for dotnetcore2.0 with multiple cs project references
body: <p>I am running a .netcore2.0 webapi using Visual studio 2017 for MAC. 
  I have a project structure as below.</p>
  
  <pre><code>src
      --Solution.sln
      -- Common
          -- commonPrj
              -- Common.csproj
      --Data
          --  QM
              --  QM.csproj
          --Repo
              --Repo.csproj
      --Ser
          --  Host
              -- Api
                  --api.csproj
  </code></pre>
  
  <p>I have the DOCKERFILE content as well. Which is throwing error while doing the dotnet build process as the build agent could not resolve the common.csproj/ I think my dockerfile definition is wrong. Can someone please assist in getting this work [i tried lot of option here with dockerfile]>?</p>
  
  <pre><code>#FROM microsoft/aspnetcore-build:2.0 AS build-env
  FROM microsoft/aspnetcore
  
  # copy csproj and restore as distinct layers
  #COPY *.csproj ./
  #RUN dotnet restore
  
  # copy everything else and build
  #COPY . ./ ./ ./
  #RUN dotnet restore
  #RUN dotnet publish -c Release -o out
  
  # build runtime image
  #FROM microsoft/aspnetcore:2.0
  #WORKDIR /app
  #COPY --from=build-env /app/out .
  
  #EXPOSE 5000
  
  COPY ./out /out
  WORKDIR /out
  #WORKDIR /publish
  
  
  ENTRYPOINT ["dotnet", "Rando.MortgageCenter.WebAPI.dll"]
  </code></pre>
  
  <p>I am trying to build this docker image using the Docker cloud environment [cloud.docker.com/swarm]</p>
  
  <pre><code>Error Log from docker cloud build
  Building in Docker Cloud's infrastructure...
  Cloning into '.'...
  Warning: Permanently added the RSA host key for IP address '104.192.143.1' to the list of known hosts.
  Reset branch 'master'
  Your branch is up-to-date with 'origin/master'.
  KernelVersion: 4.4.0-93-generic
  Arch: amd64
  BuildTime: 2017-08-17T22:50:04.828747906+00:00
  ApiVersion: 1.30
  Version: 17.06.1-ce
  MinAPIVersion: 1.12
  GitCommit: 874a737
  Os: linux
  GoVersion: go1.8.3
  Starting build of index.docker.io/systreeau/mortgagecenter:latest...
  Step 1/4 : FROM microsoft/aspnetcore
  ---&gt; f79840764591
  Step 2/4 : COPY ./out /out
  COPY failed: stat /var/lib/docker/tmp/docker-builder177013174/out: no such file or directory
  ERROR: Build failed: COPY failed: stat /var/lib/docker/tmp/docker-builder177013174/out: no such file or directory
  ERROR: Build failed with exit code 2
  </code></pre>