Merge pull request #698 from PowerShell/vors/msbuild

Remove explicit msbuild requirement
This commit is contained in:
Sergei Vorobev 2016-03-18 12:10:47 -07:00
commit dc438f2525
2 changed files with 8 additions and 7 deletions

View file

@ -84,8 +84,15 @@ function Start-PSBuild
{
# 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')
# msbuild is part of .NET Framework, we can try to get it from well-known location.
if (-not (Get-Command -Name msbuild -ErrorAction Ignore))
{
$env:path += ";${env:SystemRoot}\Microsoft.Net\Framework\v4.0.30319"
}
$precheck = $precheck -and (precheck 'msbuild' 'msbuild not found. Install Visual Studio 2015.')
}
if (-not $precheck) { return }

View file

@ -359,12 +359,6 @@ If you don't have any Visual Studio installed, you can use
`C` and `CXX` compilers, you either don't have Visual Studio, or you
don't have the Visual C++ Compiler component installed.
* Add `msbuild` to `PATH`, or create a PowerShell alias to it.
```powershell
Set-Alias msbuild C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
```
* Install CMake and add it to `PATH.`
You can install it from [Chocolatey][] or [manually][].