title: Dockerfile builds locally but fails on COPY step in Azure Devops pipeline
body: <p>I've containerized a simple windows service running on .net framework 4.8.  The app and container both build and run fine locally with this dockerfile:</p>
  <pre><code>FROM ourcontainerregistry.azurecr.io/net-framework-base:latest
  WORKDIR /app
  
  RUN cmd MSBuild.exe /property:Configuration=Release
  COPY TopShelfServiceInstaller/bin/Release/ .
  
  ENTRYPOINT [&quot;TopShelfServiceInstaller.exe&quot;]
  </code></pre>
  <p>When I connect to the container locally in docker desktop, I see the files in the C:/app directory that I expect and can confirm the service is operating as expected.</p>
  <p>However, when I try to run this dockerfile in an pipeline in Azure Devops using a windows-latest build agent, I keep getting the following error on the COPY step:</p>
  <pre><code>COPY failed: CreateFile \\?\C:\ProgramData\docker\tmp\docker-builder002424695\TopShelfServiceInstaller\bin\Release: The system cannot find the path specified.
  </code></pre>
  <p>Any ideas why this might be happening and how I can fix it?</p>
  <p>EDIT: azure-pipelines.yml for the build:</p>
  <pre><code>resources:
    repositories:
      - repository: net-framework-base
        type: git
        name: Container_DotNetFrameworkBase
    containers:
      - container: net-framework-base
        type: ACR
        azureSubscription: ---
        resourceGroup: ---
        registry: ---
        repository: net-framework-base
  
  variables:
    - name: dockerRegistryServiceConnection
      value: ---
    - name: imageRepository
      value: &quot;service&quot;
    - name: containerRegistry
      value: ---
    - name: prod-container-registry
      value: ---
    - name: dockerfilePath
      value: &quot;$(Build.SourcesDirectory)/Service/dockerfile&quot;
    - name: tag
      value: &quot;$(Build.BuildNumber)&quot;
    - name: vmImageName
      value: &quot;windows-latest&quot;
  trigger:
    batch: true
    branches:
      include:
        - feature/*
  #pr:
  stages:
    - stage: container
      displayName: New Docker Build
      dependsOn: []
      jobs:
        - job: container
          displayName: build container
          pool:
            vmImage: $(vmImageName)
          steps:
            - checkout: self
              fetchDepth: 1
            - checkout: net-framework-base
              fetchDepth: 1
  
            # this is the task that's failing
            - task: Docker@2
              displayName: build container
              inputs:
                containerRegistry: $(prod-container-registry)
                repository: $(imageRepository)
                command: &quot;build&quot;
                Dockerfile: $(dockerfilePath)
                tags: |
                  $(tag)
  </code></pre>