title: libhostpolicy.so not found when trying to run a framework dependent build
body: <p>I am trying to build docker images for my asp.net 3.1 services. When I build self-contained I can use the <code>mcr.microsoft.com/dotnet/core/runtime-deps</code> base image just fine. However to improve build speed I am trying to use the <code>mcr.microsoft.com/dotnet/core/runtime</code> or <code>aspnet</code> as my base image and copy the no-self-contained (framework dependent) publish output (from an earlier stage in docker build).</p>
  
  <p>However when I try to run the container I see <code>A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/usr/share/dotnet'.</code></p>
  
  <p>I can reproduce this using the webapi sample project and the following Dockerfile</p>
  
  <pre><code>FROM mcr.microsoft.com/dotnet/core/sdk:3.1-bionic as build
  
  WORKDIR /src
  
  COPY . .
  
  RUN dotnet restore --runtime ubuntu.18.04-x64
  RUN dotnet build --no-restore -c Release --runtime ubuntu.18.04-x64
  RUN dotnet publish --no-restore --no-build -c Release -r ubuntu.18.04-x64 -o publish --self-contained false ./app.csproj
  
  FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic
  
  WORKDIR /app
  
  COPY --from=build /src/publish/. /app/
  
  CMD [ "./app" ]
  </code></pre>
  
  <p>Also I can see the <code>libhostpolicy.so</code> bin does exist in <code>/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.3/libhostpolicy.so</code></p>
  
  <p>Can you see what I am doing wrong here?</p>