title: Hostpolicy.dll not found error when running .NET Core from Python
body: <p>i am trying to run a <code>Net Core Application</code> from python and i am getting this error message:</p>
  
  <pre><code> error:"A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'D:\\BenchmarkingApp\\BenchmarkingApp\\bin\\Debug\\netcoreapp2.1\\'.\r\nFailed to run as a self-contained app. If this should be a framework-dependent app, add the D:\\BenchmarkingApp\\BenchmarkingApp\\bin\\Debug\\netcoreapp2.1\\BenchmarkingApp.runtimeconfig.json file specifying the appropriate framework.\r\n"
  </code></pre>
  
  <p>Why do i get this error ?</p>
  
  <p><strong>Python code</strong></p>
  
  <pre><code>import subprocess
  csServerPath = "D:\\BenchmarkBuild\server\Server.dll"
  
  def main():
      command = "dotnet D:\\BenchmarkingApp\\BenchmarkingApp\\bin\Debug\\netcoreapp2.1\\BenchmarkingApp.dll 1 2 3"
      process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
      (output, err) = process.communicate()
      print("output:"+str(output))
      print("error:"+str(err))
  
  main()
  </code></pre>
  
  <p><strong>P.S</strong> If you point me towards this link : <a href="https://stackoverflow.com/questions/38085430/the-library-hostpolicy-dll-was-not-found">The library hostpolicy.dll was not found</a> as duplicate, i have  the <code>appname.runtimeconfig.json</code> in the same path with the <code>appname.dll</code></p>