public/Build-Project.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Import-Module "$PSScriptRoot/../private/Find-MsBuild.psm1" -Force

function Build-Project
{
    param (
        [Parameter(position = 0, mandatory = $true)]
        [string]$project
    )

    $msbuildPath = Find-MsBuild
    $projectPath = Resolve-Path $project
    Write-Host "Building $projectPath using $msbuildPath"

    & $msbuildPath $projectPath /t:Build /p:Configuration=Release
}