i am trying to run a Net Core Application
from python and i am getting this error message:
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"
Why do i get this error ?
Python 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()
P.S If you point me towards this link : The library hostpolicy.dll was not found as duplicate, i have the appname.runtimeconfig.json
in the same path with the appname.dll