title: VS2019 Docker support and Dockerfile failing
body: <p>VS2019, created a brand new mvc app with Windows Docker support.</p>
  
  <p>Dockerfile contents (created from template):</p>
  
  <pre><code>FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-nanoserver-1809 AS base
  WORKDIR /app
  EXPOSE 80
  
  FROM mcr.microsoft.com/dotnet/core/sdk:2.2-nanoserver-1809 AS build
  WORKDIR /src
  COPY ["mvc1.csproj", "mvc1/"]
  RUN dotnet restore "mvc1/mvc1.csproj"
  COPY . .
  WORKDIR "/src/mvc1"
  RUN dotnet build "mvc1.csproj" -c Release -o /app
  
  FROM build AS publish
  RUN dotnet publish "mvc1.csproj" -c Release -o /app
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app .
  ENTRYPOINT ["dotnet", "mvc1.dll"]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/JAt3m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JAt3m.png" alt="enter image description here"></a></p>
  
  <p>When I execute: </p>
  
  <pre><code>docker build -t mvc1 .
  </code></pre>
  
  <p>I get the following errors:</p>
  
  <blockquote>
    <p>C:\Program Files\dotnet\sdk\2.2.401\NuGet.targets(123,5): error :
    Unable to load the service index for source
    <a href="https://api.nuget.org/v3/index.json" rel="nofollow noreferrer">https://api.nuget.org/v3/index.json</a>. [C:\src\mvc1\mvc1.csproj]
    C:\Program Files\dotnet\sdk\2.2.401\NuGet.targets(123,5): error :   No
    such host is known [C:\src\mvc1\mvc1.csproj] The command 'cmd /S /C
    dotnet restore "mvc1/mvc1.csproj"' returned a non-zero code: 1</p>
  </blockquote>
  
  <p>EDIT:
  I've added this line to Dockerfile:</p>
  
  <pre><code>RUN ping google.com
  </code></pre>
  
  <p>and get:</p>
  
  <pre><code>Step 4/17 : RUN ping google.com
   ---&gt; Running in 6633175b21a8
  Ping request could not find host google.com. Please check the name and try again.
  </code></pre>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>So, it turns out when I edit my .csproj file and remove this line:</p>
  
  <pre><code>        &lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
  
            &lt;PropertyGroup&gt;
              &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
              &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
            &lt;/PropertyGroup&gt;
  
  
            &lt;ItemGroup&gt;
              &lt;PackageReference Include="Microsoft.AspNetCore.App" /&gt;
              &lt;PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /&gt;
      &lt;!-- REMOVED --&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.7.12" /&gt;
    &lt;!-- REMOVED --&gt;
            &lt;/ItemGroup&gt;
  
          &lt;/Project&gt;
  </code></pre>
  
  <p>It DOES work. Why is that? </p>