Title says it all.
Wikipedia:
Initially a Windows component only, known as Windows PowerShell, it was made open-source and cross-platform on 18 August 2016 with the introduction of PowerShell Core.[4] The former is built on .NET Framework while the latter on .NET Core.
emphasis added.
From what I recall reading, Powershell Core
should be able to invoke, effectively, Mono
. Is that correct?
see also:
Running PowerShell from .NET Core
Whatever you mean by this, I doubt it for the time being. Can you compile non-trivial code written for Mono with .Net Core and vice-versa? Maybe, but not always. Can you load libraries written for Mono with .Net Core and vice-versa? With .Net Core 2.0 you're supposed to be able to do that that's less than a year out of beta (just like PowerShell Core is less than a month out of beta). So, again, maybe, but not always. Can you use
Add-Type
with Mono code and expect it to run? Maybe, but you'll be compiling it with .Net Core, not Mono.If you mean "From PowerShell Core, call a compiled program which coincidentally was written using Mono." In that case, yeah, you can always do that. It's a shell. You can run external programs with it.
Mono and .Net Core are two implementations of the .Net CLR that run on Linux, but they're not guaranteed to always be compatible and they don't implement an identical set of namespaces. .Net Core code isn't even necessarily compatible with .Net Framework source code. It's best to think of them as different implementations of the same language, like Visual C++ vs GNU C++, or IBM Java vs Oracle Java.
As time goes on, they will converge into a supporting a single CLR standard (.Net Standard), but we're at the start of that journey. .Net Core 1.x was very bare-bones. .Net Core 2.0 fleshes out a ton, but it's still very, very early. Mono is now a MS product, but there may be components that just don't mix. Mono and .Net Core (and .Net Framework and Unity) are eventually supposed to support .Net Standard which is an EMCA standard, but they're never intended to be 100% identical. I suspect that when we get to .Net Core 4 or so, we'll have ".Net Core" which implements everything from .Net Standard and then a ".Net Windows Framework" as an extension with the missing stuff from the original .Net Framework and maybe a ".Net Linux Framework" to do the same sort of things on Linux.