forked from RazorGenerator/RazorGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
14 lines (12 loc) · 769 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$potentialMsBuildPaths = @(
[IO.Path]::Combine(${env:ProgramFiles(x86)}, "MsBuild", "12.0", "Bin"),
[IO.Path]::Combine(${env:ProgramFiles(x86)}, "MsBuild", "14.0", "Bin"),
[IO.Path]::Combine($env:Windir, "Microsoft.NET", "Framework", "v4.0.30319")
)
$msbuild = $potentialMsBuildPaths | Join-Path -ChildPath "msbuild.exe" | ? { Test-Path $_ } | Select -First 1
& $msbuild .nuget\nuget.targets /t:_DownloadNuGet /v:M
.nuget\NuGet.exe restore RazorGenerator.Tooling.sln
.nuget\NuGet.exe restore RazorGenerator.Runtime.sln
& $msbuild /p:Configuration=Release RazorGenerator.Tooling.sln /v:M
& $msbuild /p:Configuration=Release RazorGenerator.Runtime.sln /v:M
& $msbuild /p:Configuration=Release RazorGenerator.Core.Test/RazorGenerator.Core.Test.csproj /t:Test