diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 1ad8112575..572c44334a 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/core/sdk:3.1.102
+FROM mcr.microsoft.com/dotnet/core/sdk:5.0.0-preview.1.20120.5
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 80868cb91c..36ae953733 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,6 +1,6 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
- "name": ".NET Core 3.1, including pwsh (Debian 10)",
+ "name": ".NET Core 5.0, including pwsh (Debian 10)",
"dockerFile": "Dockerfile",
// Uncomment the next line to run commands after the container is created.
diff --git a/PowerShell.Common.props b/PowerShell.Common.props
index 05ad339f56..9d27847530 100644
--- a/PowerShell.Common.props
+++ b/PowerShell.Common.props
@@ -95,7 +95,7 @@
Microsoft Corporation
(c) Microsoft Corporation. All rights reserved.
- netcoreapp3.1
+ netcoreapp5.0
8.0
true
diff --git a/assets/files.wxs b/assets/files.wxs
index 36357ec070..79d91d534d 100644
--- a/assets/files.wxs
+++ b/assets/files.wxs
@@ -2019,9 +2019,6 @@
-
-
-
@@ -2037,6 +2034,12 @@
+
+
+
+
+
+
@@ -2081,9 +2084,6 @@
-
-
-
@@ -2096,6 +2096,12 @@
+
+
+
+
+
+
@@ -2104,9 +2110,6 @@
-
-
-
@@ -2155,6 +2158,12 @@
+
+
+
+
+
+
@@ -2205,15 +2214,18 @@
-
-
-
+
+
+
+
+
+
@@ -2231,9 +2243,6 @@
-
-
-
@@ -2273,6 +2282,12 @@
+
+
+
+
+
+
@@ -2314,9 +2329,6 @@
-
-
-
@@ -2332,6 +2344,12 @@
+
+
+
+
+
+
@@ -2367,9 +2385,6 @@
-
-
-
@@ -2391,6 +2406,12 @@
+
+
+
+
+
+
@@ -2444,12 +2465,15 @@
-
-
-
+
+
+
+
+
+
@@ -2464,9 +2488,6 @@
-
-
-
@@ -2509,6 +2530,12 @@
+
+
+
+
+
+
@@ -2529,9 +2556,6 @@
-
-
-
@@ -2568,6 +2592,12 @@
+
+
+
+
+
+
@@ -2591,9 +2621,6 @@
-
-
-
@@ -2627,6 +2654,12 @@
+
+
+
+
+
+
@@ -2674,9 +2707,6 @@
-
-
-
@@ -2686,6 +2716,12 @@
+
+
+
+
+
+
@@ -2715,9 +2751,6 @@
-
-
-
@@ -2745,6 +2778,12 @@
+
+
+
+
+
+
@@ -2951,9 +2990,6 @@
-
-
-
@@ -3071,8 +3107,14 @@
-
-
+
+
+
+
+
+
+
+
@@ -3722,7 +3764,6 @@
-
@@ -3742,14 +3783,12 @@
-
-
@@ -3782,7 +3821,6 @@
-
@@ -3790,7 +3828,6 @@
-
@@ -3817,7 +3854,6 @@
-
@@ -3834,7 +3870,6 @@
-
@@ -3859,13 +3894,11 @@
-
-
@@ -3886,7 +3919,6 @@
-
@@ -3906,7 +3938,6 @@
-
@@ -3933,7 +3964,6 @@
-
@@ -3946,7 +3976,6 @@
-
@@ -4023,7 +4052,6 @@
-
@@ -4063,7 +4091,35 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.psm1 b/build.psm1
index 482edfcdcd..0af6cbc4d7 100644
--- a/build.psm1
+++ b/build.psm1
@@ -712,8 +712,8 @@ function New-PSOptions {
[ValidateSet("Debug", "Release", "CodeCoverage", '')]
[string]$Configuration,
- [ValidateSet("netcoreapp3.1")]
- [string]$Framework = "netcoreapp3.1",
+ [ValidateSet("netcoreapp5.0")]
+ [string]$Framework = "netcoreapp5.0",
# These are duplicated from Start-PSBuild
# We do not use ValidateScript since we want tab completion
@@ -2410,7 +2410,7 @@ function Copy-PSGalleryModules
Restore-PSPackage -ProjectDirs (Split-Path $CsProjPath) -Force:$Force.IsPresent
$cache = dotnet nuget locals global-packages -l
- if ($cache -match "info : global-packages: (.*)") {
+ if ($cache -match "global-packages: (.*)") {
$nugetCache = $Matches[1]
}
else {
diff --git a/global.json b/global.json
index 5360f36edb..8696bf07de 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "3.1.102"
+ "version": "5.0.100-preview.1.20155.7"
}
}
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 a7d3354c36..aafcb94a14 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 abfc37d2b4..86e254efe5 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -32,8 +32,8 @@
-
-
+
+
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 2e025805f4..44e6378fb2 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 e694bc1a62..2401ed3bc8 100644
--- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
+++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
@@ -18,9 +18,9 @@
-
-
-
+
+
+
diff --git a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
index 02720796da..da504fc856 100644
--- a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
+++ b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/ResGen/ResGen.csproj b/src/ResGen/ResGen.csproj
index cb89ac9d87..cbfd8ac696 100644
--- a/src/ResGen/ResGen.csproj
+++ b/src/ResGen/ResGen.csproj
@@ -2,7 +2,7 @@
Generates C# typed bindings for .resx files
- netcoreapp3.1
+ netcoreapp5.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 3eef012f9b..fd612866b5 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/security/nativeMethods.cs b/src/System.Management.Automation/security/nativeMethods.cs
index 6b027579f0..ab5c9cf137 100644
--- a/src/System.Management.Automation/security/nativeMethods.cs
+++ b/src/System.Management.Automation/security/nativeMethods.cs
@@ -808,7 +808,7 @@ namespace System.Management.Automation.Security
internal uint cbStruct;
/// GUID->_GUID
- internal GUID gSubject;
+ internal Guid gSubject;
/// LPCWSTR->WCHAR*
[MarshalAsAttribute(UnmanagedType.LPWStr)]
@@ -827,23 +827,6 @@ namespace System.Management.Automation.Security
internal System.IntPtr pbMemSignedMsg;
}
- [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- internal struct GUID
- {
- /// unsigned int
- internal uint Data1;
-
- /// unsigned short
- internal ushort Data2;
-
- /// unsigned short
- internal ushort Data3;
-
- /// unsigned char[8]
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
- internal byte[] Data4;
- }
-
[ArchitectureSensitive]
internal static WINTRUST_FILE_INFO InitWintrustFileInfoStruct(string fileName)
{
@@ -864,11 +847,7 @@ namespace System.Management.Automation.Security
byte[] contentBytes = System.Text.Encoding.Unicode.GetBytes(content);
// The GUID of the PowerShell SIP
- bi.gSubject.Data1 = 0x603bcc1f;
- bi.gSubject.Data2 = 0x4b59;
- bi.gSubject.Data3 = 0x4e08;
- bi.gSubject.Data4 = new byte[] { 0xb7, 0x24, 0xd2, 0xc6, 0x29, 0x7e, 0xf3, 0x51 };
-
+ bi.gSubject = new Guid(0x603bcc1f, 0x4b59, 0x4e08, new byte[] { 0xb7, 0x24, 0xd2, 0xc6, 0x29, 0x7e, 0xf3, 0x51 });
bi.cbStruct = (DWORD)Marshal.SizeOf(bi);
bi.pcwszDisplayName = fileName;
bi.cbMemObject = (uint)contentBytes.Length;
@@ -1988,7 +1967,7 @@ namespace System.Management.Automation.Security
internal string pwszReferenceTag;
[MarshalAs(UnmanagedType.LPWStr)]
internal string pwszFileName;
- internal GUID gSubjectType;
+ internal Guid gSubjectType;
internal DWORD fdwMemberFlags;
internal IntPtr pIndirectData;
internal DWORD dwCertVersion;
diff --git a/src/TypeCatalogGen/TypeCatalogGen.csproj b/src/TypeCatalogGen/TypeCatalogGen.csproj
index 0b70396771..b40cfc0dc0 100644
--- a/src/TypeCatalogGen/TypeCatalogGen.csproj
+++ b/src/TypeCatalogGen/TypeCatalogGen.csproj
@@ -2,7 +2,7 @@
Generates CorePsTypeCatalog.cs given powershell.inc
- netcoreapp3.1
+ netcoreapp5.0
TypeCatalogGen
Exe
true
diff --git a/test/Test.Common.props b/test/Test.Common.props
index 57afccc777..3f2a14e227 100644
--- a/test/Test.Common.props
+++ b/test/Test.Common.props
@@ -4,7 +4,7 @@
Microsoft Corporation
(c) Microsoft Corporation. All rights reserved.
- netcoreapp3.1
+ netcoreapp5.0
8.0
true
diff --git a/test/powershell/Host/ConsoleHost.Tests.ps1 b/test/powershell/Host/ConsoleHost.Tests.ps1
index 5041a21f1b..7f8d92a4bf 100644
--- a/test/powershell/Host/ConsoleHost.Tests.ps1
+++ b/test/powershell/Host/ConsoleHost.Tests.ps1
@@ -1009,3 +1009,10 @@ Describe 'Pwsh startup and PATH' -Tag CI {
$path | Should -BeExactly ($PSHOME + [System.IO.Path]::PathSeparator)
}
}
+
+Describe 'Console host name' -Tag CI {
+ It 'Name is pwsh' -Pending {
+ # waiting on https://github.com/dotnet/runtime/issues/33673
+ (Get-Process -id $PID).Name | Should -BeExactly 'pwsh'
+ }
+}
diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1
index 9a4cf05da0..7f0cc7e6b3 100644
--- a/test/powershell/Host/Startup.Tests.ps1
+++ b/test/powershell/Host/Startup.Tests.ps1
@@ -13,7 +13,6 @@ Describe "Validate start of console host" -Tag CI {
'netstandard.dll'
'Newtonsoft.Json.dll'
'pwsh.dll'
- 'System.Buffers.dll'
'System.Collections.Concurrent.dll'
'System.Collections.dll'
'System.Collections.NonGeneric.dll'
@@ -23,7 +22,6 @@ Describe "Validate start of console host" -Tag CI {
'System.ComponentModel.TypeConverter.dll'
'System.Console.dll'
'System.Data.Common.dll'
- 'System.Diagnostics.Debug.dll'
'System.Diagnostics.FileVersionInfo.dll'
'System.Diagnostics.Process.dll'
'System.Diagnostics.TraceSource.dll'
@@ -46,9 +44,7 @@ Describe "Validate start of console host" -Tag CI {
'System.Reflection.Emit.ILGeneration.dll'
'System.Reflection.Emit.Lightweight.dll'
'System.Reflection.Primitives.dll'
- 'System.Resources.ResourceManager.dll'
'System.Runtime.dll'
- 'System.Runtime.Extensions.dll'
'System.Runtime.InteropServices.dll'
'System.Runtime.InteropServices.RuntimeInformation.dll'
'System.Runtime.Loader.dll'
@@ -62,7 +58,6 @@ Describe "Validate start of console host" -Tag CI {
'System.Text.Encoding.Extensions.dll'
'System.Text.RegularExpressions.dll'
'System.Threading.dll'
- 'System.Threading.Tasks.dll'
'System.Threading.Tasks.Parallel.dll'
'System.Threading.Thread.dll'
'System.Threading.ThreadPool.dll'
@@ -76,7 +71,6 @@ Describe "Validate start of console host" -Tag CI {
'System.Management.dll'
'System.Security.Claims.dll'
'System.Security.Cryptography.Primitives.dll'
- 'System.Security.Principal.dll'
'System.Threading.Overlapped.dll'
)
}
diff --git a/test/powershell/Language/Operators/NullConditional.Tests.ps1 b/test/powershell/Language/Operators/NullConditional.Tests.ps1
index f78455af6f..c82b88144e 100644
--- a/test/powershell/Language/Operators/NullConditional.Tests.ps1
+++ b/test/powershell/Language/Operators/NullConditional.Tests.ps1
@@ -296,7 +296,6 @@ Describe 'NullConditionalMemberAccess' -Tag 'CI' {
${array}?.length | Should -Be 3
${hash}?.a | Should -Be 1
- (Get-Process -Id $PID)?.Name | Should -BeLike "pwsh*"
(Get-Item $TestDrive)?.EnumerateFiles()?.Name | Should -BeExactly 'testfile.txt'
[int32]::MaxValue?.ToString() | Should -BeExactly '2147483647'
@@ -360,8 +359,8 @@ Describe 'NullConditionalMemberAccess' -Tag 'CI' {
It 'Use ?. on a dynamic property name' {
$testContent = @'
- $propName = 'Name'
- (Get-Process -Id $PID)?.$propName | Should -BeLike 'pwsh*'
+ $propName = 'SI'
+ (Get-Process -Id $PID)?.$propName | Should -Be (Get-Process -id $PID).SessionId
${doesNotExist}?.$propName() | Should -BeNullOrEmpty
'@
diff --git a/test/powershell/Language/Operators/TernaryOperator.Tests.ps1 b/test/powershell/Language/Operators/TernaryOperator.Tests.ps1
index 9ab4846d6b..71ce7c1ac2 100644
--- a/test/powershell/Language/Operators/TernaryOperator.Tests.ps1
+++ b/test/powershell/Language/Operators/TernaryOperator.Tests.ps1
@@ -22,7 +22,7 @@ Describe "Using of ternary operator" -Tags CI {
@{ Script = { @{name = 'name'}.Contains('name') ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
@{ Script = { (Test-Path Env:\NonExist) ? 'true' : 'false' }; ExpectedValue = 'false' }
@{ Script = { (Test-Path Env:\PSModulePath) ? 'true' : 'false' }; ExpectedValue = 'true' }
- @{ Script = { $($p = Get-Process -Id $PID; $p.Name -eq 'pwsh') ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
+ @{ Script = { $($p = Get-Process -Id $PID; $p.Id -eq $PID) ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
@{ Script = { ($a = 1) ? 2 : 3 }; ExpectedValue = 2 }
@{ Script = { $($a = 1) ? 2 : 3 }; ExpectedValue = 3 }
@{ Script = { (Write-Warning -Message warning -WarningAction SilentlyContinue) ? 1 : 2 }; ExpectedValue = 2 }
@@ -31,7 +31,7 @@ Describe "Using of ternary operator" -Tags CI {
## Condition: unary and binary expression expressions
@{ Script = { -not $IsCoreCLR ? 'Desktop' : 'Core' }; ExpectedValue = 'Core' }
@{ Script = { $PSEdition -eq 'Core' ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
- @{ Script = { $IsCoreCLR -and (Get-Process -Id $PID).Name -eq 'pwsh' ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
+ @{ Script = { $IsCoreCLR -and (Get-Process -Id $PID).Id -eq $PID ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
@{ Script = { $IsCoreCLR -and 'pwsh' -match 'p.*h' ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
@{ Script = { 1,2,3 -contains 2 ? 'Core' : 'Desktop' }; ExpectedValue = 'Core' }
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
index a6577f0c11..ba1c5e43e5 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
@@ -1901,36 +1901,6 @@ Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
}
Context "Denial of service" -Tag 'DOS' {
- It "Image Parsing" {
- $dosUri = Get-WebListenerUrl -Test 'Dos' -query @{
- dosType='img'
- dosLength='5000'
- }
- $script:content = ''
- [TimeSpan] $timeSpan = Measure-Command {
- $response = Invoke-WebRequest -Uri $dosUri
- $script:content = $response.content
- $response.Images | out-null
- }
-
- $script:content | Should -Not -BeNullOrEmpty
-
- # pathological regex
- $regex = [RegEx]::new('
]*>')
-
- [TimeSpan] $pathologicalTimeSpan = Measure-Command {
- $regex.Match($content)
- }
-
- $pathologicalRatio = $pathologicalTimeSpan.TotalMilliseconds/$timeSpan.TotalMilliseconds
- Write-Verbose "Pathological ratio: $pathologicalRatio" -Verbose
-
- # dosLength 4,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 12
- # dosLength 5,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 21
- # dosLength 10,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 75
- # in some cases we will be running in a Docker container with modest resources
- $pathologicalRatio | Should -BeGreaterThan 5
- }
It "Charset Parsing" {
$dosUri = Get-WebListenerUrl -Test 'Dos' -query @{
dosType='charset'
diff --git a/test/tools/OpenCover/OpenCover.psm1 b/test/tools/OpenCover/OpenCover.psm1
index d5fb4d3e20..84ded9e035 100644
--- a/test/tools/OpenCover/OpenCover.psm1
+++ b/test/tools/OpenCover/OpenCover.psm1
@@ -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/netcoreapp3.1/win7-x64/publish",
+ [parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/netcoreapp5.0/win7-x64/publish",
[parameter()]$PesterLogElevated = "$HOME/Documents/TestResultsElevated.xml",
[parameter()]$PesterLogUnelevated = "$HOME/Documents/TestResultsUnelevated.xml",
[parameter()]$PesterLogFormat = "NUnitXml",
diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj
index a262d481dc..f26bdcb183 100644
--- a/test/tools/WebListener/WebListener.csproj
+++ b/test/tools/WebListener/WebListener.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1
index ad3a6b0138..9e939b8a24 100644
--- a/tools/packaging/packaging.psm1
+++ b/tools/packaging/packaging.psm1
@@ -131,14 +131,14 @@ function Start-PSPackage {
-not $Script:Options -or ## Start-PSBuild hasn't been executed yet
-not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
- $Script:Options.Framework -ne "netcoreapp3.1" ## Last build wasn't for CoreCLR
+ $Script:Options.Framework -ne "netcoreapp5.0" ## Last build wasn't for CoreCLR
} else {
-not $Script:Options -or ## Start-PSBuild hasn't been executed yet
-not $crossGenCorrect -or ## Last build didn't specify '-CrossGen' correctly
-not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly
$Script:Options.Runtime -ne $Runtime -or ## Last build wasn't for the required RID
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
- $Script:Options.Framework -ne "netcoreapp3.1" ## Last build wasn't for CoreCLR
+ $Script:Options.Framework -ne "netcoreapp5.0" ## Last build wasn't for CoreCLR
}
# Make sure the most recent build satisfies the package requirement
@@ -1626,7 +1626,7 @@ function CreateNugetPlatformFolder
[string] $PlatformBinPath
)
- $destPath = New-Item -ItemType Directory -Path (Join-Path $PackageRuntimesFolder "$Platform/lib/netcoreapp3.1")
+ $destPath = New-Item -ItemType Directory -Path (Join-Path $PackageRuntimesFolder "$Platform/lib/netcoreapp5.0")
$fullPath = Join-Path $PlatformBinPath $file
if (-not(Test-Path $fullPath)) {
@@ -1726,7 +1726,7 @@ function New-ILNugetPackage
$packageRuntimesFolder = New-Item (Join-Path $filePackageFolder.FullName 'runtimes') -ItemType Directory
#region ref
- $refFolder = New-Item (Join-Path $filePackageFolder.FullName 'ref/netcoreapp3.1') -ItemType Directory -Force
+ $refFolder = New-Item (Join-Path $filePackageFolder.FullName 'ref/netcoreapp5.0') -ItemType Directory -Force
CopyReferenceAssemblies -assemblyName $fileBaseName -refBinPath $refBinPath -refNugetPath $refFolder -assemblyFileList $fileList
#endregion ref
@@ -1770,8 +1770,8 @@ function New-ILNugetPackage
"Microsoft.PowerShell.Utility"
)
- $winModuleFolder = New-Item (Join-Path $contentFolder "runtimes\win\lib\netcoreapp3.1\Modules") -ItemType Directory -Force
- $unixModuleFolder = New-Item (Join-Path $contentFolder "runtimes\unix\lib\netcoreapp3.1\Modules") -ItemType Directory -Force
+ $winModuleFolder = New-Item (Join-Path $contentFolder "runtimes\win\lib\netcoreapp5.0\Modules") -ItemType Directory -Force
+ $unixModuleFolder = New-Item (Join-Path $contentFolder "runtimes\unix\lib\netcoreapp5.0\Modules") -ItemType Directory -Force
foreach ($module in $winBuiltInModules) {
$source = Join-Path $WinFxdBinPath "Modules\$module"
@@ -2140,7 +2140,7 @@ function New-ReferenceAssembly
Write-Log "Running: dotnet $arguments"
Start-NativeExecution -sb {dotnet $arguments}
- $refBinPath = Join-Path $projectFolder "bin/Release/netcoreapp3.1/$assemblyName.dll"
+ $refBinPath = Join-Path $projectFolder "bin/Release/netcoreapp5.0/$assemblyName.dll"
if ($null -eq $refBinPath) {
throw "Reference assembly was not built."
}
@@ -3578,7 +3578,7 @@ function New-GlobalToolNupkg
}
$packageInfo | ForEach-Object {
- $ridFolder = New-Item -Path (Join-Path $_.RootFolder "tools/netcoreapp3.1/any") -ItemType Directory
+ $ridFolder = New-Item -Path (Join-Path $_.RootFolder "tools/netcoreapp5.0/any") -ItemType Directory
$packageType = $_.Type
diff --git a/tools/packaging/projects/nuget/package.csproj b/tools/packaging/projects/nuget/package.csproj
index 57538b4da8..3fd015db7f 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
- netcoreapp3.1
+ netcoreapp5.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 976389a5e4..940128ce0a 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 @@
- netcoreapp3.1
+ netcoreapp5.0
$(RefAsmVersion)
true
$(SnkFile)
@@ -14,6 +14,6 @@
-
+
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 b148712a5c..a66e15f003 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 @@
- netcoreapp3.1
+ netcoreapp5.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 c0d56db229..00a4d777c4 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 @@
- netcoreapp3.1
+ netcoreapp5.0
$(RefAsmVersion)
true
$(SnkFile)
@@ -9,7 +9,7 @@
-
-
+
+