From 3826e473131bfe327e658d67a0397f2e96870d28 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 27 Mar 2017 15:26:22 -0700 Subject: [PATCH] Update installing docs as we have moved to .NET Core SDK 1.0.1 (#3432) --- docs/building/linux.md | 10 +++++----- docs/building/macos.md | 2 +- docs/building/windows-core.md | 29 +++++++++++++++-------------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/building/linux.md b/docs/building/linux.md index d71070786..d4a654ace 100644 --- a/docs/building/linux.md +++ b/docs/building/linux.md @@ -64,11 +64,11 @@ The `Start-PSBootstrap` function does the following: - Adds the LLVM package feed - Installs our dependencies combined with the dependencies of the .NET CLI toolchain via `apt-get` - Uninstalls any prior versions of .NET CLI -- Downloads and installs the latest .NET CLI 1.0.0-preview3 SDK to `~/.dotnet` +- Downloads and installs the latest .NET Core SDK 1.0.1 to `~/.dotnet` If you want to use `dotnet` outside of `Start-PSBuild`, add `~/.dotnet` to your `PATH` environment variable. -[dotnet-cli]: https://github.com/dotnet/cli#new-to-net-cli +[dotnet-cli]: https://github.com/dotnet/cli [CMake]: https://cmake.org/cmake/help/v2.8.12/cmake.html .NET CLI @@ -76,12 +76,12 @@ If you want to use `dotnet` outside of `Start-PSBuild`, add `~/.dotnet` to your If you have any problems installing `dotnet`, please see their [documentation][cli-docs]. -The version of .NET CLI is very important; you need a recent build of 1.0.0 (**not** 1.0.1). +The version of .NET CLI is very important; the version we are currently using is `1.0.1`. Previous installations of DNX, `dnvm`, or older installations of .NET CLI can cause odd failures when running. Please check your version and uninstall prior any prior versions. -[cli-docs]: https://dotnet.github.io/getting-started/ +[cli-docs]: https://www.microsoft.com/net/core Build using our module ====================== @@ -145,7 +145,7 @@ dotnet build --configuration Linux ``` The executable will be in `./bin/[configuration]/[framework]/[rid]/[binary name]`, -where our configuration is `Linux`, framework is `netcoreapp1.0`, +where our configuration is `Linux`, framework is `netcoreapp1.1`, runtime identifier is `ubuntu.14.04-x64`, and binary name is `powershell`. The function `Get-PSOutput` will return the path to the executable; thus you can execute the development copy via `& (Get-PSOutput)`. diff --git a/docs/building/macos.md b/docs/building/macos.md index 65595561b..b5b53058e 100644 --- a/docs/building/macos.md +++ b/docs/building/macos.md @@ -21,7 +21,7 @@ The `Start-PSBootstrap` function does the following: - Uses `brew` to install CMake, OpenSSL, and GNU WGet - Uninstalls any prior versions of .NET CLI -- Downloads and installs the latest .NET CLI 1.0.0-preview3 SDK to `~/.dotnet` +- Downloads and installs the latest .NET Core SDK 1.0.1 to `~/.dotnet` If you want to use `dotnet` outside of `Start-PSBuild`, add `~/.dotnet` to your `PATH` environment variable. diff --git a/docs/building/windows-core.md b/docs/building/windows-core.md index 6c1b235a4..509872040 100644 --- a/docs/building/windows-core.md +++ b/docs/building/windows-core.md @@ -31,6 +31,7 @@ The free Community edition of Visual Studio 2015 can be downloaded [here](https: -------- We use the [.NET Command Line Interface][dotnet-cli] (`dotnet`) to build PowerShell. +The version we are currently using is `1.0.1`. The `Start-PSBootstrap` function will automatically install it and add it to your path: ```powershell @@ -38,17 +39,23 @@ Import-Module ./build.psm1 Start-PSBootstrap ``` -The `Start-PSBootstrap` function itself does exactly this: +The `Start-PSBootstrap` function calls `Install-Dotnet`: ```powershell -Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1 -OutFile install.ps1 -./install.ps1 +Install-Dotnet -Channel rel-1.0.0 -Version 1.0.1 +``` + +It removes the previously installed version of .NET CLI from `$env:LOCALAPPDATA\Microsoft\dotnet` and then does exactly this: + +```powershell +Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/v1.0.1/scripts/obtain/dotnet-install.ps1 -OutFile dotnet-install.ps1 +./dotnet-install.ps1 -Channel rel-1.0.0 -Version 1.0.1 ``` If you have any problems installing `dotnet`, please see their [documentation][cli-docs]. -[dotnet-cli]: https://github.com/dotnet/cli#new-to-net-cli -[cli-docs]: https://dotnet.github.io/getting-started/ +[dotnet-cli]: https://github.com/dotnet/cli +[cli-docs]: https://www.microsoft.com/net/core#windowscmd Build using our module ====================== @@ -60,7 +67,7 @@ Import-Module ./build.psm1 Start-PSBuild ``` -Congratulations! If everything went right, PowerShell is now built and executable as `./src/powershell-win-core/bin/Debug/netcoreapp1.0/win10-x64/powershell`. +Congratulations! If everything went right, PowerShell is now built and executable as `./src/powershell-win-core/bin/Debug/netcoreapp1.1/win10-x64/powershell`. This location is of the form `./[project]/bin/[configuration]/[framework]/[rid]/[binary name]`, and our project is `powershell`, configuration is `Debug` by default, @@ -78,12 +85,6 @@ The cross-platform host has built-in documentation via `--help`. You can run our cross-platform Pester tests with `Start-PSPester`. Building in Visual Studio ------------------------------ +------------------------- -We do not recommend building the PowerShell solution from Visual Studio. -This may lead to package version mismatches with errors similar to: -``` -C:\dev\powershell\src\System.Management.Automation\project.json(142,77): error NU1001: The dependency Microsoft.PowerShe -ll.CoreCLR.AssemblyLoadContext >= 1.0.0-* could not be resolved. -``` -If you find yourself blocked by these errors, either run `git clean -ffdx` or run `Start-PSBuild -Clean`. +We currently have the issue [#3400](https://github.com/PowerShell/PowerShell/issues/3400) tracking this task.