From d7195fc25880f11b8b0723495600a5530bc60e98 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Fri, 11 Mar 2016 15:02:52 -0800 Subject: [PATCH 1/4] Remove obsolete build.ps1 script --- build.ps1 | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 build.ps1 diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 3a5abafe2..000000000 --- a/build.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -# Publish PowerShell -dotnet publish "src/Microsoft.PowerShell.Linux.Host" --framework "netstandardapp1.5" --output "bin" From b28d96d700a2a5e8aa3d7886f78275526c1471f3 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Fri, 11 Mar 2016 16:19:05 -0800 Subject: [PATCH 2/4] Incorporate build.FullCLR.ps1 in PowerShellGitHubDev.psm1 This commit fixes #652 --- PowerShellGitHubDev.psm1 | 177 ++++++++++++++++++++++++++++++++------- README.md | 11 ++- appveyor.yml | 3 +- build.FullCLR.ps1 | 74 ---------------- 4 files changed, 154 insertions(+), 111 deletions(-) delete mode 100644 build.FullCLR.ps1 diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index 488cba6e0..7e9f07250 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -19,10 +19,12 @@ try { function Start-PSBuild { + [CmdletBinding(DefaultParameterSetName='CoreCLR')] param( [switch]$Restore, [switch]$Clean, - [string]$Output = "$PSScriptRoot/bin", + [string]$Output, + # These runtimes must match those in project.json # We do not use ValidateScript since we want tab completion [ValidateSet("ubuntu.14.04-x64", @@ -31,61 +33,172 @@ function Start-PSBuild "win10-x64", "osx.10.10-x64", "osx.10.11-x64")] - [string]$Runtime + [Parameter(ParameterSetName='CoreCLR')] + [string]$Runtime, + + [Parameter(ParameterSetName='FullCLR')] + [switch]$FullCLR, + + [Parameter(ParameterSetName='FullCLR')] + [string]$cmakeGenerator = "Visual Studio 12 2013", + + [Parameter(ParameterSetName='FullCLR')] + [ValidateSet("Debug", + "Release")] + [string]$msbuildConfiguration = "Release" ) - if (-Not (Get-Command "dotnet" -ErrorAction SilentlyContinue)) { - throw "Build dependency 'dotnet' not found in PATH! See: https://dotnet.github.io/getting-started/" + function precheck([string]$command, [string]$missedMessage) + { + $c = Get-Command $command -ErrorAction SilentlyContinue + if (-not $c) + { + Write-Warning $missedMessage + return $false + } + else + { + return $true + } } + # simplify ParameterSetNames, set output + if ($PSCmdlet.ParameterSetName -eq 'FullCLR') + { + $FullCLR = $true + } + + if (-not $Output) + { + if ($FullCLR) { $Output = "$PSScriptRoot\binFull" } else { $Output = "$PSScriptRoot\bin" } + } + + # verify we have all tools in place to do the build + $precheck = precheck 'dotnet' "Build dependency 'dotnet' not found in PATH! See: https://dotnet.github.io/getting-started/" + if ($FullCLR) + { + # cmake is needed to build powershell.exe + $precheck = $precheck -and (precheck 'cmake' 'cmake not found. You can install it from https://chocolatey.org/packages/cmake.portable') + # msbuild is needed to build powershell.exe + $precheck = $precheck -and (precheck 'msbuild' 'msbuild not found. Install Visual Studio and add msbuild to $env:PATH') + } + + if (-not $precheck) { return } + + # handle clean if ($Clean) { - Remove-Item -Force -Recurse $Output + Remove-Item -Force -Recurse $Output -ErrorAction SilentlyContinues } New-Item -Force -Type Directory $Output | Out-Null - $Top = "$PSScriptRoot/src/Microsoft.PowerShell.Linux.Host" + # handle Restore + if ($FullCLR) + { + $Top = "$PSScriptRoot\src\Microsoft.PowerShell.ConsoleHost" + $framework = 'net451' + } + else + { + $Top = "$PSScriptRoot/src/Microsoft.PowerShell.Linux.Host" + $framework = 'netstandardapp1.5' + } + if ($Restore -Or -Not (Test-Path "$Top/project.lock.json")) { dotnet restore $PSScriptRoot } - if ($IsLinux -Or $IsOSX) { - $InstallCommand = if ($IsLinux) { "apt-get" } elseif ($IsOSX) { "brew" } - foreach ($Dependency in "cmake", "g++") { - if (-Not (Get-Command $Dependency -ErrorAction SilentlyContinue)) { - throw "Build dependency '$Dependency' not found in PATH! Run '$InstallCommand install $Dependency'" + # Build native components + if (-not $FullCLR) + { + Write-Verbose "Start CoreCLR build" + + if ($IsLinux -Or $IsOSX) { + $InstallCommand = if ($IsLinux) { "apt-get" } elseif ($IsOSX) { "brew" } + foreach ($Dependency in "cmake", "g++") { + if (-Not (Get-Command $Dependency -ErrorAction SilentlyContinue)) { + throw "Build dependency '$Dependency' not found in PATH! Run '$InstallCommand install $Dependency'" + } } + + $Ext = if ($IsLinux) { "so" } elseif ($IsOSX) { "dylib" } + $Native = "$PSScriptRoot/src/libpsl-native" + $Lib = "$Native/src/libpsl-native.$Ext" + Write-Verbose "Building $Lib" + + try { + Push-Location $Native + cmake -DCMAKE_BUILD_TYPE=Debug . + make -j + make test + } finally { + Pop-Location + } + + if (-Not (Test-Path $Lib)) { throw "Compilation of $Lib failed" } + Copy-Item $Lib $Output + } + } + else + { + Write-Verbose "Start building native powershell.exe" + $build = "$PSScriptRoot/build" + if ($Clean) { + Remove-Item -Force -Recurse $build -ErrorAction SilentlyContinue } - $Ext = if ($IsLinux) { "so" } elseif ($IsOSX) { "dylib" } - $Native = "$PSScriptRoot/src/libpsl-native" - $Lib = "$Native/src/libpsl-native.$Ext" - Write-Host "Building $Lib" + mkdir $build -ErrorAction SilentlyContinue + $origPWD = $pwd + try + { + cd $build - try { - Push-Location $Native - cmake -DCMAKE_BUILD_TYPE=Debug . - make -j - make test - } finally { - Pop-Location + if ($cmakeGenerator) + { + cmake -G "$cmakeGenerator" ..\src\powershell-native + } + else + { + cmake ..\src\powershell-native + } + msbuild powershell.vcxproj /p:Configuration=$msbuildConfiguration + cp -rec $msbuildConfiguration\* $BINFULL + } + finally + { + cd $origPWD } - - if (-Not (Test-Path $Lib)) { throw "Compilation of $Lib failed" } - Copy-Item $Lib $Output } - Write-Host "Building PowerShell" - - $Arguments = "--framework", "netstandardapp1.5", "--output", $Output - + Write-Verbose "Building PowerShell" + $Arguments = "--framework", $framework, "--output", $Output if ($IsLinux -Or $IsOSX) { $Arguments += "--configuration", "Linux" } - if ($Runtime) { $Arguments += "--runtime", $Runtime } + + if ($FullCLR) + { + # there is a problem with code signing: + # AssemblyKeyFileAttribute file path cannot be correctly located, if `dotnet publish $TOP` syntax is used + # we workaround it with calling `dotnet publish` from $TOP directory instead. + $origPWD = $pwd + cd $Top + } + else + { + $Arguments += $Top + } - $Arguments += $Top + Write-Verbose "Run dotnet publish $Arguments from $pwd" - dotnet publish $Arguments + # this try-finally is part of workaround about AssemblyKeyFileAttribute issue + try + { + dotnet publish $Arguments + } + finally + { + if ($FullCLR) { cd $origPWD } + } } function Start-PSPackage diff --git a/README.md b/README.md index 668e0f1da..b39c0fa41 100644 --- a/README.md +++ b/README.md @@ -141,8 +141,9 @@ test on OS X, but some developers use PowerShell on 10.10 and 10.11. **The command `dotnet restore` must be done at least once from the top directory to obtain all the necessary .NET packages.** -Build with `./build.sh` on Linux and OS X, `./build.ps1` for Core PowerShell on -Windows, and `./build.FullCLR.ps1` for Full PowerShell on Windows. +Build with `./build.sh` on Linux and OS X. + +`Start-PSBuild` from module `.\PowerShellGitHubDev.psm1` on Windows. Specifically: @@ -161,9 +162,13 @@ In PowerShell: ```powershell cd PowerShell dotnet restore -./build.ps1 +Import-Module .\PowerShellGitHubDev.psm1 +Start-PSBuild # build CoreCLR version +Start-PSBuild -FullCLR # build FullCLR version ``` +**Tip:** use `Start-PSBuild -Verbose` switch to see more information about build process. + ### PowerShellGitHubDev Alternatively, the `PowerShellGitHubDev.psm1` module contains a `Start-PSBuild` diff --git a/appveyor.yml b/appveyor.yml index 5ae781855..733bf4bd0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,7 +26,7 @@ build_script: dotnet --version Import-Module .\PowerShellGitHubDev.psm1 Start-PSBuild - - ps: .\build.fullCLR.ps1 + Start-PSBuild -FullCLR test_script: - ps: | @@ -39,7 +39,6 @@ test_script: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) # # FullCLR - Import-Module .\PowerShellGitHubDev.psm1 $testResultsFile = ".\TestsResults.FullCLR.xml" Start-DevPSGitHub -binDir $pwd\binFull -NoNewWindow -ArgumentList '-command', "Import-Module .\bin\Modules\Pester; Import-Module .\bin\Modules\Microsoft.PowerShell.Platform; Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFile" (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) diff --git a/build.FullCLR.ps1 b/build.FullCLR.ps1 deleted file mode 100644 index 2647fedaa..000000000 --- a/build.FullCLR.ps1 +++ /dev/null @@ -1,74 +0,0 @@ -param( - # "" is for default generator on the platform - [ValidateSet( - "", - "Visual Studio 12 2013", - "Visual Studio 12 2013 Win64", - "Visual Studio 14 2015", - "Visual Studio 14 2015 Win64")] - [string]$cmakeGenerator = "Visual Studio 12 2013", - - [ValidateSet( - "Debug", - "Release")] - [string]$msbuildConfiguration = "Release" -) - -$origPWD = $pwd -try -{ - $prechecks = $true - # check per-requests - if (-not (get-command cmake -ErrorAction SilentlyContinue)) - { - Write-Warning 'cmake not found. You can install it from https://chocolatey.org/packages/cmake.portable' - $prechecks = $false - } - - if (-not (get-command msbuild -ErrorAction SilentlyContinue)) - { - Write-Warning 'msbuild not found. Install Visual Studio and add msbuild to $env:PATH' - $prechecks = $false - } - - if (-not (get-command dotnet -ErrorAction SilentlyContinue)) - { - Write-Warning 'dotnet not found. Install it from http://dotnet.github.io/getting-started/' - $prechecks = $false - } - - if (-not $prechecks) - { - return - } - # end per-requests - - $BINFULL = "$pwd/binFull" - $BUILD = "$pwd/build" - - mkdir $BINFULL -ErrorAction SilentlyContinue - - # Publish PowerShell - cd src\Microsoft.PowerShell.ConsoleHost - dotnet publish --framework net451 --output $BINFULL - - mkdir $build -ErrorAction SilentlyContinue - cd $build - - if ($cmakeGenerator) - { - cmake -G "$cmakeGenerator" ..\src\powershell-native - } - else - { - cmake ..\src\powershell-native - } - - msbuild powershell.vcxproj /p:Configuration=$msbuildConfiguration - - cp -rec $msbuildConfiguration\* $BINFULL -} -finally -{ - cd $origPWD -} From b126d698e20b4c65a367c7b2a86b76b1100975c3 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Fri, 11 Mar 2016 18:24:43 -0800 Subject: [PATCH 3/4] Hide output of dotnet restore by default Address Andy's comments about build script. Add more information about the version into build Use windows inbox version of pester for FullCLR Revert dotnet cli to a known good version to avoid #638 --- .travis.yml | 2 +- PowerShellGitHubDev.psm1 | 48 ++++++++++++++++++++++++---------------- README.md | 2 +- appveyor.yml | 34 +++++++++++++++++----------- 4 files changed, 52 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99ae89a88..a95fb403a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_install: - sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' - sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 - sudo apt-get -qq update - - sudo apt-get install -y dotnet=1.0.0.001638-1 + - sudo apt-get install -y dotnet=1.0.0.001425-1 script: - dotnet restore - ./build.sh diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index 7e9f07250..60e2e166f 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -62,6 +62,11 @@ function Start-PSBuild } } + function log([string]$message) + { + Write-Host -Foreground Green $message + } + # simplify ParameterSetNames, set output if ($PSCmdlet.ParameterSetName -eq 'FullCLR') { @@ -70,7 +75,7 @@ function Start-PSBuild if (-not $Output) { - if ($FullCLR) { $Output = "$PSScriptRoot\binFull" } else { $Output = "$PSScriptRoot\bin" } + if ($FullCLR) { $Output = "$PSScriptRoot/binFull" } else { $Output = "$PSScriptRoot/bin" } } # verify we have all tools in place to do the build @@ -87,12 +92,12 @@ function Start-PSBuild # handle clean if ($Clean) { - Remove-Item -Force -Recurse $Output -ErrorAction SilentlyContinues + Remove-Item -Force -Recurse $Output -ErrorAction SilentlyContinue } New-Item -Force -Type Directory $Output | Out-Null - # handle Restore + # define key build variables if ($FullCLR) { $Top = "$PSScriptRoot\src\Microsoft.PowerShell.ConsoleHost" @@ -104,16 +109,26 @@ function Start-PSBuild $framework = 'netstandardapp1.5' } + # handle Restore if ($Restore -Or -Not (Test-Path "$Top/project.lock.json")) { - dotnet restore $PSScriptRoot + log "Run dotnet restore" + # restore is genuinely verbose. + # we don't show it by default to keep CI build log size small + if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) + { + dotnet restore $PSScriptRoot + } + else + { + dotnet restore $PSScriptRoot > $null + } } # Build native components if (-not $FullCLR) { - Write-Verbose "Start CoreCLR build" - if ($IsLinux -Or $IsOSX) { + log "Start building native components" $InstallCommand = if ($IsLinux) { "apt-get" } elseif ($IsOSX) { "brew" } foreach ($Dependency in "cmake", "g++") { if (-Not (Get-Command $Dependency -ErrorAction SilentlyContinue)) { @@ -141,36 +156,32 @@ function Start-PSBuild } else { - Write-Verbose "Start building native powershell.exe" + log "Start building native powershell.exe" $build = "$PSScriptRoot/build" if ($Clean) { Remove-Item -Force -Recurse $build -ErrorAction SilentlyContinue } mkdir $build -ErrorAction SilentlyContinue - $origPWD = $pwd try { - cd $build + Push-Location $build if ($cmakeGenerator) { - cmake -G "$cmakeGenerator" ..\src\powershell-native + cmake -G $cmakeGenerator ..\src\powershell-native } else { cmake ..\src\powershell-native } msbuild powershell.vcxproj /p:Configuration=$msbuildConfiguration - cp -rec $msbuildConfiguration\* $BINFULL - } - finally - { - cd $origPWD + cp -rec $msbuildConfiguration\* $Output } + finally { Pop-Location } } - Write-Verbose "Building PowerShell" + log "Building PowerShell" $Arguments = "--framework", $framework, "--output", $Output if ($IsLinux -Or $IsOSX) { $Arguments += "--configuration", "Linux" } if ($Runtime) { $Arguments += "--runtime", $Runtime } @@ -180,8 +191,7 @@ function Start-PSBuild # there is a problem with code signing: # AssemblyKeyFileAttribute file path cannot be correctly located, if `dotnet publish $TOP` syntax is used # we workaround it with calling `dotnet publish` from $TOP directory instead. - $origPWD = $pwd - cd $Top + Push-Location $Top } else { @@ -197,7 +207,7 @@ function Start-PSBuild } finally { - if ($FullCLR) { cd $origPWD } + if ($FullCLR) { Pop-Location } } } diff --git a/README.md b/README.md index b39c0fa41..424859be5 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ to obtain all the necessary .NET packages.** Build with `./build.sh` on Linux and OS X. -`Start-PSBuild` from module `.\PowerShellGitHubDev.psm1` on Windows. +`Start-PSBuild` from module `.\PowerShellGitHubDev.psm1` on Windows and Linux / OS X, if you self-hosting PowerShell. Specifically: diff --git a/appveyor.yml b/appveyor.yml index 733bf4bd0..055b191be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,5 @@ +version: 0.2.0.{build} + environment: priv_key: secure: @@ -18,7 +20,7 @@ install: - git config --global url.git@github.com:.insteadOf https://github.com/ - git submodule update --init --recursive -- src/monad src/windows-build src/Microsoft.PowerShell.Linux.Host/Modules/Pester - ps: Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile install.ps1 - - ps: ./install.ps1 -version 1.0.0.001638 -channel beta + - ps: ./install.ps1 -version 1.0.0.001425 -channel beta build_script: - ps: | @@ -34,32 +36,38 @@ test_script: $ErrorActionPreference = 'Stop' # # CoreCLR - $testResultsFile = ".\TestsResults.xml" + Write-Host -Foreground Green 'Run CoreCLR tests' + $testResultsFile = "$pwd\TestsResults.xml" .\bin\powershell.exe --noprofile -c "Import-Module .\bin\Modules\Microsoft.PowerShell.Platform; Invoke-Pester test/powershell -OutputFormat NUnitXml -OutputFile $testResultsFile" (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) # # FullCLR - $testResultsFile = ".\TestsResults.FullCLR.xml" - Start-DevPSGitHub -binDir $pwd\binFull -NoNewWindow -ArgumentList '-command', "Import-Module .\bin\Modules\Pester; Import-Module .\bin\Modules\Microsoft.PowerShell.Platform; Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFile" - (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) + Write-Host -Foreground Green 'Run FullCLR tests' + $testResultsFileFullCLR = "$pwd\TestsResults.FullCLR.xml" + Start-DevPSGitHub -binDir $pwd\binFull -NoNewWindow -ArgumentList '-command', "Import-Module .\src\monad\monad\src\OSS\Pester; Import-Module .\bin\Modules\Microsoft.PowerShell.Platform; Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFileFullCLR" + (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFileFullCLR)) # # Fail the build, if tests failed - $x = [xml](cat -raw .\TestsResults.FullCLR.xml) - if ([int]$x.'test-results'.failures -gt 0) - { - throw "$($x.'test-results'.failures) tests in test/fullCLR failed" - } - $x = [xml](cat -raw .\TestsResults.xml) + Write-Host -Foreground Green 'Upload CoreCLR test results' + $x = [xml](cat -raw $testResultsFile) if ([int]$x.'test-results'.failures -gt 0) { throw "$($x.'test-results'.failures) tests in test/powershell failed" } + Write-Host -Foreground Green 'Upload FullCLR test results' + $x = [xml](cat -raw $testResultsFileFullCLR) + if ([int]$x.'test-results'.failures -gt 0) + { + throw "$($x.'test-results'.failures) tests in test/fullCLR failed" + } + on_finish: - ps: | # Creating project artifact - $zipFilePath = Join-Path $pwd "$(Split-Path $pwd -Leaf).zip" - $zipFileFullPath = Join-Path $pwd "$(Split-Path $pwd -Leaf).FullCLR.zip" + $name = git describe + $zipFilePath = Join-Path $pwd "$name.zip" + $zipFileFullPath = Join-Path $pwd "$name.FullCLR.zip" Add-Type -assemblyname System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\bin", $zipFilePath) [System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\binFull", $zipFileFullPath) From 44a991c24d48fe477718324eff6fce81cc5961f6 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 14 Mar 2016 10:49:31 -0700 Subject: [PATCH 4/4] Upgrade CLI to build 1718 Per dotnet/cli#1783, this should resolve PowerShell/PowerShell#638. Unfortunately, per dotnet/cli#1839, the Ubuntu package feed is out-of-date. So now Travis and AppVeyor aren't quite in sync. This is not great, but the Ubuntu version of CLI does not have the same regression that the Windows version had. The readme has been updated to note how to install an actually up-to-date copy on Linux. --- README.md | 21 ++++++++++++++++----- appveyor.yml | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 424859be5..0210ad252 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ non-Windows platforms). Install `dotnet` by following their [documentation][]. The version of .NET CLI is very important, you want a recent 1.0.0 beta (**not** 1.0.1). The following instructions will install precisely -1.0.0.001638, though any 1.0.0 version *should* work. +1.0.0.001718, though any 1.0.0 version *should* work. > Previous installations of DNX, `dnvm`, or older installations of .NET CLI > can cause odd failures when running. Please check your version. @@ -89,17 +89,28 @@ The version of .NET CLI is very important, you want a recent 1.0.0 beta Tested on Ubuntu 14.04. + +This installs the .NET CLI package feed. The benefit to this is that +installing `dotnet` using `apt-get` will also install all of its +dependencies automatically. + ```sh sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 sudo apt-get update -sudo apt-get install dotnet=1.0.0.001638-1 +sudo apt-get install dotnet=1.0.0.001675-1 ``` -Then install the following additional build / debug tools: +The drawback of using the feed is that it gets out of date. The pinned +version is the most recent package published to the feed, but newer +packages are available. To upgrade the package, install it by +hand. Unfortunately, `dpkg` does not handle dependency resolution, so +it is recommended to first install the older version from the feed, +and then upgrade it. ```sh -sudo apt-get install g++ cmake make lldb-3.6 strace +wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-ubuntu-x64.latest.deb +sudo dpkg -i ./dotnet-ubuntu-x64.latest.deb ``` #### OMI @@ -119,7 +130,7 @@ An MSI installer also exists, but this script avoids touching your system. ```powershell Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile install.ps1 -./install.ps1 -version 1.0.0.001638 -channel beta +./install.ps1 -version 1.0.0.001718 -channel beta ``` If you meet `Unable to cast COM object of type 'System.__ComObject' to diff --git a/appveyor.yml b/appveyor.yml index 055b191be..146ba9eb9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ install: - git config --global url.git@github.com:.insteadOf https://github.com/ - git submodule update --init --recursive -- src/monad src/windows-build src/Microsoft.PowerShell.Linux.Host/Modules/Pester - ps: Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile install.ps1 - - ps: ./install.ps1 -version 1.0.0.001425 -channel beta + - ps: ./install.ps1 -version 1.0.0.001718 -channel beta build_script: - ps: |