"Windows Powershell compatibility (.net standard 2.0)" 是什么意思?
What does "Windows Powershell compatibility (.net standard 2.0)" mean?
我一直在寻找一种在 .net standard 2.0 中执行 Powershell cmdlet 的方法,但最终发现这是不可能的,因为 powershell 是使用 .net 框架或 .net core for powershell core 构建的。
在我的研究过程中,我发现了这一点:https://github.com/PowerShell/PowerShell/projects/4
如果无法在 .net 标准中执行 powershell,那么这个项目代表什么?
.Net Standard is a specification which defines a set of APIs which the .Net platform has to implement. It is not another .Net platform though. You can only build libraries, not executables with it. On the following screenshot, you can see that .Net Standard contains APIs from the classic .Net framework, .Net core and Xamarin.
因此,您可以根据确保它 运行 在 net framework、net core 或 Xamarin.这是因为 类、接口等定义的(在标准中)集是由前面提到的框架实现的。随着网络标准版本的增加,支持的数量 类、接口增加。
由于 Powershell 不是库,您必须在 Powershell 5.x(使用网络框架)或 Powershell 6(=使用网络核心)之间做出选择。由于您可以从 Powershell 调用 C# 库,因此可以从 Powershell 5 和 Powershell 6 调用实现网络标准的库。
我一直在寻找一种在 .net standard 2.0 中执行 Powershell cmdlet 的方法,但最终发现这是不可能的,因为 powershell 是使用 .net 框架或 .net core for powershell core 构建的。
在我的研究过程中,我发现了这一点:https://github.com/PowerShell/PowerShell/projects/4
如果无法在 .net 标准中执行 powershell,那么这个项目代表什么?
.Net Standard is a specification which defines a set of APIs which the .Net platform has to implement. It is not another .Net platform though. You can only build libraries, not executables with it. On the following screenshot, you can see that .Net Standard contains APIs from the classic .Net framework, .Net core and Xamarin.
因此,您可以根据确保它 运行 在 net framework、net core 或 Xamarin.这是因为 类、接口等定义的(在标准中)集是由前面提到的框架实现的。随着网络标准版本的增加,支持的数量 类、接口增加。
由于 Powershell 不是库,您必须在 Powershell 5.x(使用网络框架)或 Powershell 6(=使用网络核心)之间做出选择。由于您可以从 Powershell 调用 C# 库,因此可以从 Powershell 5 和 Powershell 6 调用实现网络标准的库。