diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 7c940b0211b..b765445ef97 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
-FROM mcr.microsoft.com/dotnet/nightly/sdk:5.0.100
+FROM mcr.microsoft.com/dotnet/nightly/sdk:6.0.100
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
diff --git a/.vsts-ci/templates/ci-build.yml b/.vsts-ci/templates/ci-build.yml
index 1838d99b060..9dc43bc8ebf 100644
--- a/.vsts-ci/templates/ci-build.yml
+++ b/.vsts-ci/templates/ci-build.yml
@@ -22,11 +22,18 @@ jobs:
- template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
+ - pwsh: |
+ if (Test-Path -Path $HOME/.dotnet) {
+ Remove-Item $HOME/.dotnet -Recurse -Force
+ }
+ displayName: Remove Old .NET SDKs
+ condition: succeededOrFailed()
+
- pwsh: |
Import-Module .\tools\ci.psm1
Invoke-CIInstall -SkipUser
displayName: Bootstrap
- condition: succeededOrFailed()
+ condition: succeeded()
- powershell: |
Import-Module .\tools\ci.psm1
diff --git a/.vsts-ci/templates/nix-test.yml b/.vsts-ci/templates/nix-test.yml
index 0938a93bcf9..6a1b6e6f9de 100644
--- a/.vsts-ci/templates/nix-test.yml
+++ b/.vsts-ci/templates/nix-test.yml
@@ -33,11 +33,17 @@ jobs:
displayName: 'Capture Artifacts Directory'
continueOnError: true
+ - pwsh: |
+ if (Test-Path -Path $HOME/.dotnet) {
+ Remove-Item $HOME/.dotnet -Recurse -Force
+ }
+ displayName: Remove Old .NET SDKs
+ condition: succeededOrFailed()
+
- pwsh: |
Import-Module .\tools\ci.psm1
Invoke-CIInstall -SkipUser
displayName: Bootstrap
- condition: succeededOrFailed()
- task: ExtractFiles@1
displayName: 'Extract Build ZIP'
diff --git a/.vsts-ci/templates/windows-test.yml b/.vsts-ci/templates/windows-test.yml
index a153b563e3f..b021e45f000 100644
--- a/.vsts-ci/templates/windows-test.yml
+++ b/.vsts-ci/templates/windows-test.yml
@@ -34,10 +34,21 @@ jobs:
# must be run frow Windows PowerShell
- powershell: |
+ # Remove "Program Files\dotnet" from the env variable PATH, so old SDKs won't affect us.
+ Write-Host "Old Path:"
+ Write-Host $env:Path
+
+ $dotnetPath = Join-Path $env:SystemDrive 'Program Files\dotnet'
+ $paths = $env:Path -split ";" | Where-Object { -not $_.StartsWith($dotnetPath) }
+ $env:Path = $paths -join ";"
+
+ Write-Host "New Path:"
+ Write-Host $env:Path
+
+ # Bootstrap
Import-Module .\tools\ci.psm1
Invoke-CIInstall
displayName: Bootstrap
- condition: succeededOrFailed()
- pwsh: |
Import-Module .\tools\ci.psm1
diff --git a/.vsts-ci/windows/templates/windows-packaging.yml b/.vsts-ci/windows/templates/windows-packaging.yml
index c3c6bfcfe3e..19d2be32618 100644
--- a/.vsts-ci/windows/templates/windows-packaging.yml
+++ b/.vsts-ci/windows/templates/windows-packaging.yml
@@ -22,12 +22,11 @@ jobs:
- template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
- - powershell: |
- [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
+ - pwsh: |
Import-Module .\tools\ci.psm1
- Invoke-CIInstall
+ Invoke-CIInstall -SkipUser
displayName: Bootstrap
- condition: succeededOrFailed()
+ condition: succeeded()
- pwsh: |
Import-Module .\tools\ci.psm1
diff --git a/PowerShell.Common.props b/PowerShell.Common.props
index 2e9f8e6f63b..73110a79695 100644
--- a/PowerShell.Common.props
+++ b/PowerShell.Common.props
@@ -97,7 +97,7 @@
Microsoft Corporation
(c) Microsoft Corporation.
- net5.0
+ net6.0
9.0
true
diff --git a/assets/files.wxs b/assets/files.wxs
index 199e964fe17..05a7446573a 100644
--- a/assets/files.wxs
+++ b/assets/files.wxs
@@ -104,9 +104,6 @@
-
-
-
@@ -1599,18 +1596,9 @@
-
-
-
-
-
-
-
-
-
@@ -1620,6 +1608,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3054,8 +3054,17 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -3095,7 +3104,6 @@
-
@@ -3593,10 +3601,7 @@
-
-
-
@@ -4041,7 +4046,14 @@
-
+
+
+
+
+
+
+
+
diff --git a/build.psm1 b/build.psm1
index b4548a66725..a854d5827c4 100644
--- a/build.psm1
+++ b/build.psm1
@@ -397,7 +397,8 @@ Fix steps:
}
# setup arguments
- $Arguments = @("publish","--no-restore","/property:GenerateFullPaths=true")
+ # adding ErrorOnDuplicatePublishOutputFiles=false due to .NET SDk issue: https://github.com/dotnet/sdk/issues/15748
+ $Arguments = @("publish","--no-restore","/property:GenerateFullPaths=true", "/property:ErrorOnDuplicatePublishOutputFiles=false")
if ($Output -or $SMAOnly) {
$Arguments += "--output", (Split-Path $Options.Output)
}
@@ -750,8 +751,8 @@ function New-PSOptions {
[ValidateSet("Debug", "Release", "CodeCoverage", '')]
[string]$Configuration,
- [ValidateSet("net5.0")]
- [string]$Framework = "net5.0",
+ [ValidateSet("net6.0")]
+ [string]$Framework = "net6.0",
# These are duplicated from Start-PSBuild
# We do not use ValidateScript since we want tab completion
diff --git a/global.json b/global.json
index ee8f712f95d..a6b7a831364 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "5.0.100"
+ "version": "6.0.100-preview.1.21104.4"
}
}
diff --git a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
index e17bceaa9b5..16cdf5f48d4 100644
--- a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
+++ b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
@@ -47,7 +47,7 @@
-
+
diff --git a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
index 0ccf40d80ed..3acd57c6505 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -31,9 +31,9 @@
-
-
-
+
+
+
diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
index e7445b07d21..8be5faddce8 100644
--- a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
+++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
index f89ec614d82..654ed9ef9c0 100644
--- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
+++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
@@ -16,21 +16,21 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
index d012eeafc6f..45d4d4b2bad 100644
--- a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
+++ b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Modules/PSGalleryModules.csproj b/src/Modules/PSGalleryModules.csproj
index 63807dc1e50..ae838f27601 100644
--- a/src/Modules/PSGalleryModules.csproj
+++ b/src/Modules/PSGalleryModules.csproj
@@ -5,7 +5,7 @@
Microsoft Corporation
(c) Microsoft Corporation.
- net5.0
+ net6.0
true
diff --git a/src/ResGen/ResGen.csproj b/src/ResGen/ResGen.csproj
index 70170d7c1cb..5c736ad9ed9 100644
--- a/src/ResGen/ResGen.csproj
+++ b/src/ResGen/ResGen.csproj
@@ -2,7 +2,7 @@
Generates C# typed bindings for .resx files
- net5.0
+ net6.0
resgen
Exe
true
diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj
index 562b98361ac..dd1d6d14dde 100644
--- a/src/System.Management.Automation/System.Management.Automation.csproj
+++ b/src/System.Management.Automation/System.Management.Automation.csproj
@@ -16,16 +16,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/System.Management.Automation/help/HelpCommentsParser.cs b/src/System.Management.Automation/help/HelpCommentsParser.cs
index 21ac7b9e79d..7b853381d4d 100644
--- a/src/System.Management.Automation/help/HelpCommentsParser.cs
+++ b/src/System.Management.Automation/help/HelpCommentsParser.cs
@@ -448,7 +448,7 @@ internal XmlDocument BuildXmlFromComments()
foreach (string link in _links)
{
XmlElement navigationLink = _doc.CreateElement("maml:navigationLink", mamlURI);
- bool isOnlineHelp = Uri.IsWellFormedUriString(Uri.EscapeUriString(link), UriKind.Absolute);
+ bool isOnlineHelp = Uri.IsWellFormedUriString(link, UriKind.Absolute);
string nodeName = isOnlineHelp ? "maml:uri" : "maml:linkText";
XmlElement linkText = _doc.CreateElement(nodeName, mamlURI);
XmlText linkText_text = _doc.CreateTextNode(link);
diff --git a/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs b/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs
index 6bd8b6e84b4..49d1e67e5d9 100644
--- a/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs
+++ b/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs
@@ -102,7 +102,7 @@ public SwitchParameter UseDefaultCredentials
}
}
- internal bool _useDefaultCredentials = false;
+ private bool _useDefaultCredentials = false;
///
/// Forces the operation to complete.
@@ -397,7 +397,7 @@ protected override void EndProcessing()
/// FullyQualifiedNames.
internal void Process(IEnumerable moduleNames, IEnumerable fullyQualifiedNames)
{
- _helpSystem.WebClient.UseDefaultCredentials = _useDefaultCredentials;
+ _helpSystem.UseDefaultCredentials = _useDefaultCredentials;
if (moduleNames != null)
{
diff --git a/src/System.Management.Automation/help/UpdatableHelpSystem.cs b/src/System.Management.Automation/help/UpdatableHelpSystem.cs
index d302f7b9cae..31fe5362d77 100644
--- a/src/System.Management.Automation/help/UpdatableHelpSystem.cs
+++ b/src/System.Management.Automation/help/UpdatableHelpSystem.cs
@@ -240,7 +240,9 @@ internal class UpdatableHelpSystem : IDisposable
private readonly UpdatableHelpCommandBase _cmdlet;
private readonly CancellationTokenSource _cancelTokenSource;
- internal WebClient WebClient { get; }
+ internal HttpClient HttpClient { get; }
+
+ internal bool UseDefaultCredentials;
internal string CurrentModule { get; set; }
@@ -249,7 +251,7 @@ internal class UpdatableHelpSystem : IDisposable
///
internal UpdatableHelpSystem(UpdatableHelpCommandBase cmdlet, bool useDefaultCredentials)
{
- WebClient = new WebClient();
+ HttpClient = new HttpClient();
_defaultTimeout = new TimeSpan(0, 0, 30);
_progressEvents = new Collection();
Errors = new Collection();
@@ -258,7 +260,7 @@ internal UpdatableHelpSystem(UpdatableHelpCommandBase cmdlet, bool useDefaultCre
_cmdlet = cmdlet;
_cancelTokenSource = new CancellationTokenSource();
- WebClient.UseDefaultCredentials = useDefaultCredentials;
+ UseDefaultCredentials = useDefaultCredentials;
#if !CORECLR
WebClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(HandleDownloadProgressChanged);
@@ -275,7 +277,7 @@ public void Dispose()
_completionEvent.Dispose();
#endif
_cancelTokenSource.Dispose();
- WebClient.Dispose();
+ HttpClient.Dispose();
GC.SuppressFinalize(this);
}
@@ -339,7 +341,7 @@ internal UpdatableHelpInfo GetHelpInfo(UpdatableHelpCommandType commandType, str
string xml;
using (HttpClientHandler handler = new HttpClientHandler())
{
- handler.UseDefaultCredentials = WebClient.UseDefaultCredentials;
+ handler.UseDefaultCredentials = UseDefaultCredentials;
using (HttpClient client = new HttpClient(handler))
{
client.Timeout = _defaultTimeout;
@@ -420,7 +422,7 @@ private string ResolveUri(string baseUri, bool verbose)
using (HttpClientHandler handler = new HttpClientHandler())
{
handler.AllowAutoRedirect = false;
- handler.UseDefaultCredentials = WebClient.UseDefaultCredentials;
+ handler.UseDefaultCredentials = UseDefaultCredentials;
using (HttpClient client = new HttpClient(handler))
{
client.Timeout = new TimeSpan(0, 0, 30); // Set 30 second timeout
@@ -785,7 +787,7 @@ private bool DownloadHelpContentHttpClient(string uri, string fileName, Updatabl
using (HttpClientHandler handler = new HttpClientHandler())
{
handler.AllowAutoRedirect = false;
- handler.UseDefaultCredentials = WebClient.UseDefaultCredentials;
+ handler.UseDefaultCredentials = UseDefaultCredentials;
using (HttpClient client = new HttpClient(handler))
{
client.Timeout = _defaultTimeout;
diff --git a/src/TypeCatalogGen/TypeCatalogGen.csproj b/src/TypeCatalogGen/TypeCatalogGen.csproj
index 1ba3029ff18..c7966c37b79 100644
--- a/src/TypeCatalogGen/TypeCatalogGen.csproj
+++ b/src/TypeCatalogGen/TypeCatalogGen.csproj
@@ -2,7 +2,7 @@
Generates CorePsTypeCatalog.cs given powershell.inc
- net5.0
+ net6.0
TypeCatalogGen
Exe
true
diff --git a/test/Test.Common.props b/test/Test.Common.props
index 02ac0912eb9..d965a3779a0 100644
--- a/test/Test.Common.props
+++ b/test/Test.Common.props
@@ -6,7 +6,7 @@
Microsoft Corporation
(c) Microsoft Corporation.
- net5.0
+ net6.0
9.0
true
diff --git a/test/tools/OpenCover/OpenCover.psm1 b/test/tools/OpenCover/OpenCover.psm1
index 45d5c682a19..d0def0abf6c 100644
--- a/test/tools/OpenCover/OpenCover.psm1
+++ b/test/tools/OpenCover/OpenCover.psm1
@@ -615,7 +615,7 @@ function Install-OpenCover
.Description
Invoke-OpenCover runs tests under OpenCover by executing tests on PowerShell located at $PowerShellExeDirectory.
.EXAMPLE
- Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/net5.0/win7-x64
+ Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/net6.0/win7-x64
#>
function Invoke-OpenCover
{
@@ -624,7 +624,7 @@ function Invoke-OpenCover
[parameter()]$OutputLog = "$HOME/Documents/OpenCover.xml",
[parameter()]$TestPath = "${script:psRepoPath}/test/powershell",
[parameter()]$OpenCoverPath = "$HOME/OpenCover",
- [parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/net5.0/win7-x64/publish",
+ [parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/net6.0/win7-x64/publish",
[parameter()]$PesterLogElevated = "$HOME/Documents/TestResultsElevated.xml",
[parameter()]$PesterLogUnelevated = "$HOME/Documents/TestResultsUnelevated.xml",
[parameter()]$PesterLogFormat = "NUnitXml",
diff --git a/test/tools/TestService/TestService.csproj b/test/tools/TestService/TestService.csproj
index 8c651cabba2..21d0fc76962 100644
--- a/test/tools/TestService/TestService.csproj
+++ b/test/tools/TestService/TestService.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj
index 6adedf53878..de62702c6e2 100644
--- a/test/tools/WebListener/WebListener.csproj
+++ b/test/tools/WebListener/WebListener.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1
index 93e713f21c2..45fb61957c0 100644
--- a/tools/packaging/packaging.psm1
+++ b/tools/packaging/packaging.psm1
@@ -8,7 +8,7 @@ $packagingStrings = Import-PowerShellDataFile "$PSScriptRoot\packaging.strings.p
Import-Module "$PSScriptRoot\..\Xml" -ErrorAction Stop -Force
$DebianDistributions = @("ubuntu.16.04", "ubuntu.18.04", "ubuntu.20.04", "debian.9", "debian.10", "debian.11")
$RedhatDistributions = @("rhel.7","centos.8")
-$script:netCoreRuntime = 'net5.0'
+$script:netCoreRuntime = 'net6.0'
$script:iconFileName = "Powershell_black_64.png"
$script:iconPath = Join-Path -path $PSScriptRoot -ChildPath "../../assets/$iconFileName" -Resolve
@@ -2012,7 +2012,7 @@ function New-ILNugetPackage
}
<#
- Copy the generated reference assemblies to the 'ref/net5.0' folder properly.
+ Copy the generated reference assemblies to the 'ref/net6.0' folder properly.
This is a helper function used by 'New-ILNugetPackage'
#>
function CopyReferenceAssemblies
@@ -2605,7 +2605,6 @@ function New-NugetContentPackage
$arguments = @('pack')
$arguments += @('--output',$nugetFolder)
$arguments += @('--configuration',$PackageConfiguration)
- $arguments += @('--runtime',$PackageRuntime)
$arguments += "/p:StagingPath=$stagingRoot"
$arguments += "/p:RID=$PackageRuntime"
$arguments += "/p:SemVer=$nugetSemanticVersion"
@@ -2950,7 +2949,7 @@ function New-MSIPatch
# This example shows how to produce a Debug-x64 installer for development purposes.
cd $RootPathOfPowerShellRepo
Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1
- New-MSIPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net5.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
+ New-MSIPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net6.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
#>
function New-MSIPackage
{
@@ -3184,7 +3183,7 @@ function Start-MsiBuild {
# This example shows how to produce a Debug-x64 installer for development purposes.
cd $RootPathOfPowerShellRepo
Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1
- New-MSIXPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net5.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
+ New-MSIXPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\net6.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
#>
function New-MSIXPackage
{
diff --git a/tools/packaging/packaging.strings.psd1 b/tools/packaging/packaging.strings.psd1
index 444bfa7f3a0..8fcb4e93fc5 100644
--- a/tools/packaging/packaging.strings.psd1
+++ b/tools/packaging/packaging.strings.psd1
@@ -142,7 +142,7 @@ open {0}
-
+
diff --git a/tools/packaging/projects/nuget/package.csproj b/tools/packaging/projects/nuget/package.csproj
index e20f5a13523..cee634e2ffa 100644
--- a/tools/packaging/projects/nuget/package.csproj
+++ b/tools/packaging/projects/nuget/package.csproj
@@ -11,6 +11,6 @@
runtime=$(RID);version=$(SemVer);PackageName=$(PackageName)
$(StagingPath)
True
- net5.0
+ net6.0
diff --git a/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
index d6aa032de2b..1360181e9bc 100644
--- a/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/tools/packaging/projects/reference/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -1,6 +1,6 @@
- net5.0
+ net6.0
$(RefAsmVersion)
true
$(SnkFile)
@@ -14,7 +14,7 @@
-
+
diff --git a/tools/packaging/projects/reference/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj b/tools/packaging/projects/reference/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
index b393fe1cd2b..a95a2a47cac 100644
--- a/tools/packaging/projects/reference/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
+++ b/tools/packaging/projects/reference/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
@@ -1,6 +1,6 @@
- net5.0
+ net6.0
$(RefAsmVersion)
true
$(SnkFile)
diff --git a/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj b/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj
index a917b07fafc..76baeb19619 100644
--- a/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj
+++ b/tools/packaging/projects/reference/System.Management.Automation/System.Management.Automation.csproj
@@ -1,6 +1,6 @@
- net5.0
+ net6.0
$(RefAsmVersion)
true
$(SnkFile)
@@ -9,7 +9,7 @@
-
-
+
+