Skip to content

Instantly share code, notes, and snippets.

View kberridge's full-sized avatar

Kevin Berridge kberridge

View GitHub Profile
@kberridge
kberridge / project.build.ps1
Created April 20, 2020 16:51
Invoke-Build direct calling bootstrap script (load or install compatible msbuild version, self updating and support different versions in different projects)
param (
[Parameter(Position=0)]
$Tasks
#... other params
)
function IsVersionCompatible($requiredVersion, $testVersion) {
# same major, and AT LEAST the required minor and build
$testVersion.Major -eq $requiredVersion.Major `
-and $testVersion.Minor -ge $requiredVersion.Minor `