title: Failed to compute cache key: ".csproj" not found
body: <p>I am new to Docker. I created a Web API using ASP.Net Core using Visual Studio 2019 as well as in VS Code. It works fine. Then I added docker support and added Dockerfile with default values.</p>
  <p>When I try to build the docker image, it fails in Visual Studio 2019 as well as in VS Code.</p>
  <p>However, If I try to run the Docker image using the Visual Studio 2019 provided option (where I can select docker as run), then the image gets created.
  But when I run the build command in Visual Studio 2019 or VS Code i.e.</p>
  <pre><code>docker build -f ./Dockerfile --force-rm -t mytestapp:dev ..
  it throws following error&lt;br&gt;
   =&gt; ERROR [build 3/7] COPY [myTestApp.csproj, ./]  
  Content of my docker file is given below
  FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
  WORKDIR /app
  EXPOSE 80
  
  FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  WORKDIR /src
  COPY [&quot;myTestApp.csproj&quot;, &quot;./&quot;]
  RUN dotnet restore &quot;myTestApp.csproj&quot;
  COPY . .
  WORKDIR &quot;/src/.&quot;
  RUN dotnet build &quot;myTestApp.csproj&quot; -c Release -o /app/build
  
  FROM build AS publish
  RUN dotnet publish &quot;myTestApp.csproj&quot; -c Release -o /app/publish
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app/publish .
  ENTRYPOINT [&quot;dotnet&quot;, &quot;myTestApp.dll&quot;]
  </code></pre>
  <p>The project structure picture is also attached:</p>
  <p><a href="https://i.stack.imgur.com/bzfCF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bzfCF.png" alt="structure" /></a></p>