我正在尝试让pythonnet在我运行在Linux上的.Net核心应用程序中工作。在
我提到了Python.Runtime.dll在我的.Net核心项目中。在
我的代码是:using System;
using Python.Runtime;
namespace pythonnet_w
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Start");
using (**Py.GIL()**) {
// blabla
}
Console.WriteLine("End");
}
}
}
我得到这个运行时错误:
^{pr2}$
试图在这些线索中找到解决方案,但没有任何运气:
更新:
我试图打开\pythonnet master\src\runtime**Python.Runtime.csproj**在visualstudio中查看是否可以将其编译为.Net或.Core,但我只能编译到.netframework。
我找到了这篇文章“How to port from .net framework to .net standard”
这就是我要做的吗?在