Я пытаюсь запустить Net Core Application
из python, и я получаю это сообщение об ошибке:
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"
Почему я получаю эту ошибку?
Код Python
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()
PS Если вы укажете мне на эту ссылку: Библиотека hostpolicy.dll не была найдена как дубликат, у меня есть appname.runtimeconfig.json
в том же пути с appname.dll