forked from xerxesb/SpecFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
29 lines (20 loc) · 953 Bytes
/
build.ps1
File metadata and controls
29 lines (20 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
param (
[string]$Configuration = "Debug",
[string]$appInsightsInstrumentationKey = ""
)
$msbuildPath = "msbuild"
Write-Host ($appInsightsInstrumentationKey -eq "")
if ($IsWindows){
$vswherePath = [System.Environment]::ExpandEnvironmentVariables("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe")
$vswhereParameters = @("-latest", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-property", "installationPath", "-prerelease")
$vsPath = & $vswherePath $vswhereParameters
Write-Host $path
if ($vsPath) {
$msbuildPath = join-path $vsPath 'MSBuild\Current\Bin\MSBuild.exe'
}
Write-Host $msbuildPath
}
if ($appInsightsInstrumentationKey) {
$extraArgs = "-property:AppInsightsInstrumentationKey=$appInsightsInstrumentationKey"
}
& $msbuildPath /Restore ./TechTalk.SpecFlow.sln /property:Configuration=$Configuration /binaryLogger:msbuild.$Configuration.binlog /nodeReuse:false $extraArgs