PowerShell 7.0 / 7.1 and .NET runtimes

A Microsoft Doc has a table for required versions of .NET Framework for PowerShell versions 3.0 to 5.1: https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/install/windows-powershell-system-requirements?view=powershell-7#microsoft-net-framework-requirements

After installing PowerShell 7.0 on a fresh Linux instance that didn't have PowerShell or .NET, I noticed that PS cmdlets worked normally. When I looked at the .NET runtimes, none were listed. When I ran $PSVersionTable it didn't list the CLR, instead the following:

PS /home/ubuntu> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Linux 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6 01:17:09 UTC 2020
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

This generated a few questions:

  • Is PowerShell 7.0 and 7.1 (currently being developed) considered a "self-contained" published .NET Core applications?
  • Does PowerShell 7.0 contain an self-contained/embedded version of .NET Core 3.1?
  • Will PowerShell 7.1 contain an self-contained/embedded version of .NET 5.0?
  • If you install other versions of .NET Core or .NET (such as .NET 6.0 - when released) would that have an affect on 7.0 or 7.1, or would always use the self-contained/embedded version?

Solution 1:

Here is a link to the documentation where they list which packages are dependencies on each Linux distribution that's officially supported https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7#binary-archives

The PowerShell packages will reference their dependencies but how you get them depends on how you install PowerShell.