diff --git a/src/System.Management.Automation/engine/PSVersionInfo.cs b/src/System.Management.Automation/engine/PSVersionInfo.cs index 620577d8d43..b0a9274480f 100644 --- a/src/System.Management.Automation/engine/PSVersionInfo.cs +++ b/src/System.Management.Automation/engine/PSVersionInfo.cs @@ -68,13 +68,8 @@ private const int Version_Major private static readonly Version s_psV2Version = new(2, 0); private static readonly Version s_psV3Version = new(3, 0); private static readonly Version s_psV4Version = new(4, 0); - private static readonly Version s_psV5Version = new(5, 0); private static readonly Version s_psV51Version = new(5, 1); - private static readonly Version s_psV6Version = new(6, 0, 0); - private static readonly Version s_psV61Version = new(6, 1, 0); - private static readonly Version s_psV62Version = new(6, 2, 0); private static readonly Version s_psV7Version = new(7, 0, 0); - private static readonly Version s_psV71Version = new(7, 1, 0); private static readonly Version s_psV72Version = new(7, 2, 0); private static readonly Version s_psVersion; private static readonly SemanticVersion s_psSemVersion; @@ -97,7 +92,7 @@ static PSVersionInfo() s_psVersionTable[PSVersionName] = s_psSemVersion; s_psVersionTable[PSEditionName] = PSEditionValue; s_psVersionTable[PSGitCommitIdName] = GitCommitId; - s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV5Version, s_psV51Version, s_psV6Version, s_psV61Version, s_psV62Version, s_psV7Version, s_psV71Version, s_psV72Version, s_psVersion }; + s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV51Version, s_psV7Version, s_psV72Version, s_psVersion }; s_psVersionTable[SerializationVersionName] = new Version(InternalSerializer.DefaultVersion); s_psVersionTable[PSRemotingProtocolVersionName] = RemotingConstants.ProtocolVersion; s_psVersionTable[WSManStackVersionName] = GetWSManStackVersion(); diff --git a/test/powershell/Host/PSVersionTable.Tests.ps1 b/test/powershell/Host/PSVersionTable.Tests.ps1 index 3f6ccfcd8ba..fb1cc0d0aed 100644 --- a/test/powershell/Host/PSVersionTable.Tests.ps1 +++ b/test/powershell/Host/PSVersionTable.Tests.ps1 @@ -23,7 +23,7 @@ Describe "PSVersionTable" -Tags "CI" { $unexpectectGitCommitIdPattern = $fullVersionPattern } - $powerShellVersions = "1.0", "2.0", "3.0", "4.0", "5.0", "5.1", "6.0", "6.1", "6.2", "7.0", "7.1", "7.2", "7.3" + $powerShellVersions = "1.0", "2.0", "3.0", "4.0", "5.1", "7.0", "7.2", "7.3" $powerShellCompatibleVersions = $PSVersionTable.PSCompatibleVersions | ForEach-Object {$_.ToString(2).SubString(0,3)} }