diff --git a/appveyor.yml b/appveyor.yml
index 12fe698e014..c3fb13dc4ad 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,7 +2,7 @@ version: 6.0.0-beta.2-{build}
image: Visual Studio 2015
-# cache version - netcoreapp.2.0.0-preview1-002106-00
+# cache version - netcoreapp.2.0.0-preview2-25407-01
cache:
- '%LocalAppData%\Microsoft\dotnet -> appveyor.yml'
- '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml'
diff --git a/build.psm1 b/build.psm1
index 10f1f53c50b..3cb3d17bc32 100644
--- a/build.psm1
+++ b/build.psm1
@@ -982,7 +982,7 @@ function Install-Dotnet {
[CmdletBinding()]
param(
[string]$Channel = "preview",
- [string]$Version = "2.0.0-preview1-005952",
+ [string]$Version = "2.0.0-preview2-006388",
[switch]$NoSudo
)
@@ -1044,7 +1044,7 @@ function Start-PSBootstrap {
[string]$Channel = "preview",
# we currently pin dotnet-cli version, and will
# update it when more stable version comes out.
- [string]$Version = "2.0.0-preview1-005952",
+ [string]$Version = "2.0.0-preview2-006388",
[switch]$Package,
[switch]$NoSudo,
[switch]$Force
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 c38477248e6..f92bdb350ea 100644
--- a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
+++ b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
@@ -78,7 +78,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 2ac72e3b5d9..c882b89ff21 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -90,7 +90,7 @@
-
+
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs
index 9a74abe7b00..ea47b0cd911 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs
@@ -147,7 +147,7 @@ internal virtual HttpClient GetHttpClient()
if (SkipCertificateCheck)
{
- handler.ServerCertificateCustomValidationCallback = delegate { return true; };
+ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
}
if (WebSession.MaximumRedirection > -1)
diff --git a/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj b/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
index 34eb0d2a323..b8118ccefac 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
+++ b/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
@@ -25,7 +25,7 @@
-
+
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 d1377e41d8b..816357023ae 100644
--- a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
+++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
@@ -32,7 +32,7 @@
-
+
diff --git a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
index 2c9cc44241f..f2fa045d886 100644
--- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
+++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
@@ -17,17 +17,17 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj
index bd1c08c0373..277da6d8b02 100644
--- a/src/System.Management.Automation/System.Management.Automation.csproj
+++ b/src/System.Management.Automation/System.Management.Automation.csproj
@@ -19,12 +19,12 @@
-
+
-
-
-
-
+
+
+
+
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1
index d3964dc8dc1..3b2696af758 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ChildItem.Tests.ps1
@@ -66,7 +66,9 @@ Describe "Get-ChildItem" -Tags "CI" {
$file.Count | Should be 1
$file.Name | Should be "pagefile.sys"
}
- It "Should continue enumerating a directory when a contained item is deleted" {
+ # Test is pending on Unix platforms because of a behavior change in the latest .NET Core.
+ # Tracked by https://github.com/dotnet/corefx/issues/20456
+ It "Should continue enumerating a directory when a contained item is deleted" -Pending:(!$IsWindows) {
$Error.Clear()
[System.Management.Automation.Internal.InternalTestHooks]::SetTestHook("GciEnumerationActionDelete", $true)
$result = Get-ChildItem -Path $TestDrive -ErrorAction SilentlyContinue
@@ -84,7 +86,9 @@ Describe "Get-ChildItem" -Tags "CI" {
$result.Count | Should BeExactly 4
}
}
- It "Should continue enumerating a directory when a contained item is renamed" {
+ # Test is pending on Unix platforms because of a behavior change in the latest .NET Core.
+ # Tracked by https://github.com/dotnet/corefx/issues/20456
+ It "Should continue enumerating a directory when a contained item is renamed" -Pending:(!$IsWindows) {
$Error.Clear()
[System.Management.Automation.Internal.InternalTestHooks]::SetTestHook("GciEnumerationActionRename", $true)
$result = Get-ChildItem -Path $TestDrive -ErrorAction SilentlyContinue
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
index 4d76a6c3ca1..a2608335ad6 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
@@ -443,9 +443,7 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
$jsonContent.headers.'User-Agent' | Should Match "WindowsPowerShell"
}
- ## 'HttpClientHandler.ServerCertificateCustomValidationCallback' currently doesn't work in netcoreapp2.0 on Mac at all.
- ## This is tracked by powershell issue #3648.
- It "Validate Invoke-WebRequest -SkipCertificateCheck" -Pending:$IsOSX {
+ It "Validate Invoke-WebRequest -SkipCertificateCheck" {
# validate that exception is thrown for URI with expired certificate
$command = "Invoke-WebRequest -Uri 'https://expired.badssl.com'"
@@ -837,9 +835,7 @@ Describe "Invoke-RestMethod tests" -Tags "Feature" {
$jsonContent.headers.'User-Agent' | Should Match "WindowsPowerShell"
}
- ## 'HttpClientHandler.ServerCertificateCustomValidationCallback' currently doesn't work in netcoreapp2.0 on Mac at all.
- ## This is tracked by powershell issue #3648.
- It "Validate Invoke-RestMethod -SkipCertificateCheck" -Pending:$IsOSX {
+ It "Validate Invoke-RestMethod -SkipCertificateCheck" {
# HTTP method HEAD must be used to not retrieve an unparsable HTTP body
# validate that exception is thrown for URI with expired certificate