specflow.exe-找不到'libhostpolicy.so'

时间:2019-02-17 10:05:16

标签: linux ubuntu specflow

我正在尝试在Linux上运行nuget软件包随附的specflow.exe,但出现以下错误:

sashoalm@HP:~/.nuget/packages/specflow/2.4.1/tools$ dotnet specflow.exe
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/home/sashoalm/.nuget/packages/specflow/2.4.1/tools/'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the /home/sashoalm/.nuget/packages/specflow/2.4.1/tools/specflow.runtimeconfig.json file specifying the appropriate framework.

我找到了文件

sashoalm@HP:~$ locate libhostpolicy.so
/usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.7/libhostpolicy.so

如何使specflow.exe使用它?

1 个答案:

答案 0 :(得分:1)

SpecFlow <= 2.4不支持.NET Core,因此无法使用dotnet specflow.exe执行specflow.exe。
您可以尝试使用Mono执行它。所以是mono specflow.exe