title: Docker Desktop for Windows + ASP.NET Core Error
body: <p>I have recently decided to give docker a try and I'm running into this error for 2 days now. No matter what I do, I can't seem to get rid of it.</p>
  
  <p>For a .NET Core 2.2 application:</p>
  
  <p><code>2&gt;C:\Users\Russell\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.4.4\build\Container.targets(256,5): error : An item with the same key has already been added.</code></p>
  
  <p>This is freshly added Docker support for the project, no config changes. I've tried a clean, rebuild, updated all nugets, etc. If I run the project in IIS express it runs fine.</p>
  
  <p>Anyone have any thoughts?</p>
  
  <p>Edit 1: Docker file:</p>
  
  <pre><code>WORKDIR /app
  EXPOSE 80
  EXPOSE 443
  
  FROM microsoft/dotnet:2.2-sdk AS build
  WORKDIR /src
  COPY ["SearchAPICore_Search/SearchAPICore_Search.csproj", "SearchAPICore_Search/"]
  COPY ["SearchAPICore_Models/SearchAPICore_Models.csproj", "SearchAPICore_Models/"]
  RUN dotnet restore "SearchAPICore_Search/SearchAPICore_Search.csproj"
  COPY . .
  WORKDIR "/src/SearchAPICore_Search"
  RUN dotnet build "SearchAPICore_Search.csproj" -c Release -o /app
  
  FROM build AS publish
  RUN dotnet publish "SearchAPICore_Search.csproj" -c Release -o /app
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app .
  ENTRYPOINT ["dotnet", "SearchAPICore_Search.dll"]```
  
  </code></pre>