Move powershell to 2.0.0-preview3-25426-01 using the .NET CLI 2.0.0-preview2-006502 (#4144)

This commit is contained in:
Dongbo Wang 2017-06-30 13:07:14 -07:00 committed by GitHub
parent a2922d6ac4
commit 3e35fb9918
20 changed files with 68 additions and 91 deletions

View file

@ -5,13 +5,13 @@
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
<VersionPrefix>6.0.0</VersionPrefix>
<NeutralLanguage>en-US</NeutralLanguage>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0-preview3-25426-01</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NeutralLanguage>en-US</NeutralLanguage>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile>

View file

@ -2,7 +2,7 @@ version: 6.0.0-beta.3-{build}
image: Visual Studio 2015
# cache version - netcoreapp.2.0.0-preview1-002106-00
# cache version - netcoreapp.2.0.0-preview3-25426-01
cache:
- '%LocalAppData%\Microsoft\dotnet -> appveyor.yml'
- '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml'

View file

@ -20,7 +20,7 @@ try {
}
$dotnetCLIChannel = "preview"
$dotnetCLIRequiredVersion = "2.0.0-preview1-005952"
$dotnetCLIRequiredVersion = "2.0.0-preview2-006502"
# On Unix paths is separated by colon
# On Windows paths is separated by semicolon
@ -1049,7 +1049,15 @@ function Install-Dotnet {
Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet
$installScript = "dotnet-install.ps1"
Invoke-WebRequest -Uri $obtainUrl/$installScript -OutFile $installScript
& ./$installScript -Channel $Channel -Version $Version
if (-not $IsCoreCLR) {
& ./$installScript -Channel $Channel -Version $Version
} else {
# dotnet-install.ps1 uses APIs that are not supported in .NET Core, so we run it with Windows PowerShell
$fullPSPath = Join-Path -Path $env:windir -ChildPath "System32\WindowsPowerShell\v1.0\powershell.exe"
$fullDotnetInstallPath = Join-Path -Path $pwd.Path -ChildPath $installScript
Start-NativeExecution { & $fullPSPath -NoLogo -NoProfile -File $fullDotnetInstallPath -Channel $Channel -Version $Version }
}
}
}

View file

@ -70,7 +70,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.4.0-preview3-25423-02" />
</ItemGroup>
</Project>

View file

@ -165,7 +165,7 @@ namespace Microsoft.PowerShell.Commands
if (SkipCertificateCheck)
{
handler.ServerCertificateCustomValidationCallback = delegate { return true; };
handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
}
// This indicates GetResponse will handle redirects.

View file

@ -25,7 +25,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Security.Principal.Windows" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.4.0-preview3-25423-02" />
</ItemGroup>
</Project>

View file

@ -8,14 +8,7 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PSReadLine")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PSReadLine")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
@ -24,16 +17,3 @@ using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("36053fb0-0bd0-4a1c-951c-b2ec109deca3")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.2")]

View file

@ -1,22 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\PowerShell.Common.props"/>
<PropertyGroup>
<VersionPrefix>6.0.0</VersionPrefix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DelaySign>true</DelaySign>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>PowerShell Core's Microsoft.PowerShell.PSReadLine project</Description>
<AssemblyName>Microsoft.PowerShell.PSReadLine</AssemblyName>
<AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
</PropertyGroup>
<ItemGroup>

View file

@ -17,17 +17,17 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.IO.Packaging" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.ServiceModel.Duplex" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.ServiceModel.Http" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.ServiceModel.Security" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Threading.AccessControl" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Private.ServiceModel" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.IO.Packaging" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.ServiceModel.Duplex" Version="4.4.0-preview3-25423-01" />
<PackageReference Include="System.ServiceModel.Http" Version="4.4.0-preview3-25423-01" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.4.0-preview3-25423-01" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.4.0-preview3-25423-01" />
<PackageReference Include="System.ServiceModel.Security" Version="4.4.0-preview3-25423-01" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.Threading.AccessControl" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.Private.ServiceModel" Version="4.4.0-preview3-25423-01" />
</ItemGroup>
</Project>

View file

@ -5,7 +5,7 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>resgen</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>ubuntu.16.10-x64;ubuntu.16.04-x64;ubuntu.14.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>ubuntu.16.10-x64;ubuntu.16.04-x64;ubuntu.14.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>

View file

@ -11,12 +11,12 @@
<ItemGroup>
<ProjectReference Include="..\Microsoft.PowerShell.CoreCLR.AssemblyLoadContext\Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.csproj" />
<ProjectReference Include="..\Microsoft.PowerShell.CoreCLR.Eventing\Microsoft.PowerShell.CoreCLR.Eventing.csproj" />
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Security.AccessControl" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.4.0-preview1-25302-01" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.Security.AccessControl" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.4.0-preview3-25423-02" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0-alpha*" />
</ItemGroup>

View file

@ -5,7 +5,7 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>TypeCatalogGen</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

View file

@ -6,7 +6,7 @@
<Description>PowerShell top-level project with .NET CLI host</Description>
<AssemblyName>powershell</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>

View file

@ -1,20 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Test.Common.props"/>
<PropertyGroup>
<Description>PSReadLine basic tests</Description>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>TestPSReadLine</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win10-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>

13
test/Test.Common.props Normal file
View file

@ -0,0 +1,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>PowerShell Core Test</Product>
<Company>Microsoft Corporation</Company>
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0-preview3-25426-01</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</Project>

View file

@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Test.Common.props"/>
<PropertyGroup>
<Description>PowerShell On Linux xUnit Tests</Description>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DelaySign>true</DelaySign>
<AssemblyName>powershell-tests</AssemblyName>
<AssemblyOriginatorKeyFile>../../src/signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>

View file

@ -24,9 +24,7 @@ Describe 'native commands with pipeline' -tags 'Feature' {
$rs.ResetRunspaceState()
}
# Make this test pending because of too many regressions in the latest .NET Core
# and thus we have to get back to an older .NET Core.
It "native | native | native should work fine" -Pending {
It "native | native | native should work fine" {
if ($IsWindows) {
$result = @(ping.exe | findstr.exe count | findstr.exe ping)

View file

@ -66,7 +66,9 @@ Describe "Get-ChildItem" -Tags "CI" {
$file.Count | Should be 1
$file.Name | Should be $item_F
}
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.
# See https://github.com/dotnet/corefx/issues/20456 for more information.
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.
# See https://github.com/dotnet/corefx/issues/20456 for more information.
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

View file

@ -507,9 +507,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'"
@ -954,9 +952,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

View file

@ -5,7 +5,7 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>testexe</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>ubuntu.16.04-x64;ubuntu.14.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>ubuntu.16.04-x64;ubuntu.14.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>