Skip to content

Commit 32a8601

Browse files
randomvariabledaxian-dbw
authored andcommitted
Rebase onto .NET Core 1.1 (#2737)
* Rebase onto .NET Core 1.1 Modify `Build.psm1` and `project.json` files to use .NET Core 1.1. .NET Core 1.1 ships with an older dotnet/cli than has currently been used, so we revert to use case-sensitive directory names for dependencies. .NET Core 1.1 is a pre-requisite for supporting Fedora 24. * PSReadLine: Bump major version of PSReadline to 6.0.0-* * Microsoft.PowerShell.Commands.Utility: Bump major version of Microsoft.CodeAnalysis.Csharp * Microsoft.PowerShell.SDK: Revert attempt to import netcoreapp1.1 instead of dnxcore * build.psm1: Restore ability to specify version of dotnet-install.sh
1 parent e568fda commit 32a8601

24 files changed

Lines changed: 170 additions & 172 deletions

File tree

build.psm1

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ cmd.exe /C cd /d "$location" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch
401401
if($PSModuleRestore)
402402
{
403403
# Downloading the PowerShellGet and PackageManagement modules.
404-
# $Options.Output is pointing to something like "...\src\powershell-win-core\bin\Debug\netcoreapp1.0\win10-x64\publish\powershell.exe",
404+
# $Options.Output is pointing to something like "...\src\powershell-win-core\bin\Debug\netcoreapp1.1\win10-x64\publish\powershell.exe",
405405
# so we need to get its parent directory
406406
$publishPath = Split-Path $Options.Output -Parent
407407
log "Restore PowerShell modules to $publishPath"
@@ -429,7 +429,7 @@ function New-PSOptions {
429429
[ValidateSet("Linux", "Debug", "Release", "CodeCoverage", "")]
430430
[string]$Configuration,
431431

432-
[ValidateSet("netcoreapp1.0", "net451")]
432+
[ValidateSet("netcoreapp1.1", "net451")]
433433
[string]$Framework,
434434

435435
# These are duplicated from Start-PSBuild
@@ -506,7 +506,7 @@ function New-PSOptions {
506506
$Framework = if ($FullCLR) {
507507
"net451"
508508
} else {
509-
"netcoreapp1.0"
509+
"netcoreapp1.1"
510510
}
511511
Write-Verbose "Using framework '$Framework'"
512512
}
@@ -893,7 +893,7 @@ function Start-PSxUnit {
893893
function Install-Dotnet {
894894
[CmdletBinding()]
895895
param(
896-
[string]$Channel = "rel-1.0.0",
896+
[string]$Channel = "preview",
897897
[string]$Version,
898898
[switch]$NoSudo
899899
)
@@ -902,9 +902,7 @@ function Install-Dotnet {
902902
# Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly
903903
$sudo = if (!$NoSudo) { "sudo" }
904904

905-
# this url is temporarely alternated because of https://github.com/dotnet/cli/issues/4715
906-
# it should be reverted back to "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain" ASAP
907-
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/9855dc0088cf7e56e24860c734f33fe8353f38a6/scripts/obtain"
905+
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/v1.0.0-preview2-1-3177/scripts/obtain"
908906

909907
# Install for Linux and OS X
910908
if ($IsLinux -or $IsOSX) {
@@ -924,7 +922,7 @@ function Install-Dotnet {
924922
Write-Warning "This script only removes prior versions of dotnet for Ubuntu 14.04 and OS X"
925923
}
926924

927-
# Install new dotnet 1.0.0 preview packages
925+
# Install new dotnet 1.1.0 preview packages
928926
$installScript = "dotnet-install.sh"
929927
Start-NativeExecution {
930928
curl -sO $obtainUrl/$installScript
@@ -952,11 +950,11 @@ function Start-PSBootstrap {
952950
SupportsShouldProcess=$true,
953951
ConfirmImpact="High")]
954952
param(
955-
[string]$Channel = "rel-1.0.0",
953+
[string]$Channel = "preview",
956954
# we currently pin dotnet-cli version, because tool
957955
# is currently migrating to msbuild toolchain
958956
# and requires constant updates to our build process.
959-
[string]$Version = "1.0.0-preview3-003930",
957+
[string]$Version = "1.0.0-preview2-1-003177",
960958
[switch]$Package,
961959
[switch]$NoSudo,
962960
[switch]$Force
@@ -1152,7 +1150,7 @@ function Start-PSPackage {
11521150
-not $Script:Options.CrossGen -or ## Last build didn't specify -CrossGen
11531151
$Script:Options.Runtime -ne $Runtime -or ## Last build wasn't for the required RID
11541152
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
1155-
$Script:Options.Framework -ne "netcoreapp1.0") ## Last build wasn't for CoreCLR
1153+
$Script:Options.Framework -ne "netcoreapp1.1") ## Last build wasn't for CoreCLR
11561154
{
11571155
# It's possible that the most recent build doesn't satisfy the package requirement but
11581156
# an earlier build does. e.g., run the following in order on win10-x64:

docs/building/linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Start-PSBuild
101101
Congratulations! If everything went right, PowerShell is now built.
102102
The `Start-PSBuild` script will output the location of the executable:
103103

104-
`./src/powershell-unix/bin/Linux/netcoreapp1.0/ubuntu.14.04-x64/powershell`.
104+
`./src/powershell-unix/bin/Linux/netcoreapp1.1/ubuntu.14.04-x64/powershell`.
105105

106106
You should now be running the `powershell` that you just built, if your run the above executable.
107107
You can run our cross-platform Pester tests with `Start-PSPester`, and our xUnit tests with `Start-PSxUnit`.

docs/building/macos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ download the `pkg` from our GitHub releases page using your browser, complete th
6868
start a `powershell` session, and use `Start-PSBuild` from the module.
6969

7070
The output directory will be slightly different because your runtime identifier is different.
71-
PowerShell will be at `./src/powershell-unix/bin/Linux/netcoreapp1.0/osx.10.11-x64/powershell`,
71+
PowerShell will be at `./src/powershell-unix/bin/Linux/netcoreapp1.1/osx.10.11-x64/powershell`,
7272
or `osx.10.10` depending on your operating system version.
7373
Note that configuration is still `Linux` because it would be silly to make yet another separate configuration when it's used solely to work-around a CLI issue.

docs/building/windows-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Congratulations! If everything went right, PowerShell is now built and executabl
6464

6565
This location is of the form `./[project]/bin/[configuration]/[framework]/[rid]/[binary name]`,
6666
and our project is `powershell`, configuration is `Debug` by default,
67-
framework is `netcoreapp1.0`, runtime identifier is **probably** `win10-x64`
67+
framework is `netcoreapp1.1`, runtime identifier is **probably** `win10-x64`
6868
(but will depend on your operating system;
6969
don't worry, `dotnet --info` will tell you what it was), and binary name is `powershell`.
7070
The function `Get-PSOutput` will return the path to the executable;

docs/cmdlet-example/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"netstandard1.3": {
1212
"imports": [ "net40" ],
1313
"dependencies": {
14-
"Microsoft.NETCore": "5.0.3-preview1-001100-00",
14+
"Microsoft.NETCore": "5.0.3-rc2-0-0",
1515
"Microsoft.NETCore.Portable.Compatibility": "1.0.3-beta-24514-00"
1616
}
1717
}

src/Microsoft.PowerShell.Commands.Management/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@
9393
}
9494
},
9595
"dependencies": {
96-
"System.ServiceProcess.ServiceController": "4.3.0-preview1-24530-04",
97-
"System.Net.NameResolution": "4.3.0-preview1-24530-04",
98-
"System.Net.Ping": "4.3.0-preview1-24530-04"
96+
"System.ServiceProcess.ServiceController": "4.3.0",
97+
"System.Net.NameResolution": "4.3.0",
98+
"System.Net.Ping": "4.3.0"
9999
}
100100
},
101101
"net451": {

src/Microsoft.PowerShell.Commands.Utility/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@
105105
},
106106
"imports": [ "dnxcore50", "portable-net45+win8" ],
107107
"dependencies": {
108-
"Microsoft.CodeAnalysis.CSharp": "1.3.1-beta1-20160616-03",
109-
"System.Diagnostics.TextWriterTraceListener": "4.3.0-preview1-24530-04"
108+
"Microsoft.CodeAnalysis.CSharp": "2.0.0-rc",
109+
"System.Diagnostics.TextWriterTraceListener": "4.3.0"
110110
}
111111
},
112112
"net451": {

src/Microsoft.PowerShell.ConsoleHost/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
}
6262
},
6363
"dependencies": {
64-
"System.Xml.XDocument": "4.3.0-preview1-24530-04",
65-
"System.IO.MemoryMappedFiles": "4.3.0-preview1-24530-04"
64+
"System.Xml.XDocument": "4.3.0",
65+
"System.IO.MemoryMappedFiles": "4.3.0"
6666
}
6767
},
6868
"net451": {

src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
"define": [ "CORECLR" ]
4242
},
4343
"dependencies": {
44-
"NETStandard.Library": "1.6.1-preview1-24530-04",
45-
"System.Runtime.Loader": "4.3.0-preview1-24530-04",
46-
"System.Reflection.Metadata": "1.4.1-preview1-24530-04",
47-
"System.Reflection.TypeExtensions": "4.3.0-preview1-24530-04",
48-
"System.Security.Cryptography.Algorithms": "4.3.0-preview1-24530-04"
44+
"NETStandard.Library": "1.6.1",
45+
"System.Runtime.Loader": "4.3.0",
46+
"System.Reflection.Metadata": "1.4.1",
47+
"System.Reflection.TypeExtensions": "4.3.0",
48+
"System.Security.Cryptography.Algorithms": "4.3.0"
4949
}
5050
}
5151
}

src/Microsoft.PowerShell.CoreCLR.Eventing/project.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
"define": [ "CORECLR" ]
4444
},
4545
"dependencies": {
46-
"NETStandard.Library": "1.6.1-preview1-24530-04",
47-
"System.Security.Principal": "4.3.0-preview1-24530-04",
48-
"System.Security.Principal.Windows": "4.3.0-preview1-24530-04",
49-
"System.Diagnostics.TraceSource": "4.3.0-preview1-24530-04",
50-
"System.Security.SecureString": "4.3.0-preview1-24530-04"
46+
"NETStandard.Library": "1.6.1",
47+
"System.Security.Principal": "4.3.0",
48+
"System.Security.Principal.Windows": "4.3.0",
49+
"System.Diagnostics.TraceSource": "4.3.0",
50+
"System.Security.SecureString": "4.3.0"
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)