Skip to content

Instantly share code, notes, and snippets.

@jammycakes
Last active June 29, 2019 14:18
Show Gist options
  • Save jammycakes/f7138a3ae6b916dfbfed to your computer and use it in GitHub Desktop.
Save jammycakes/f7138a3ae6b916dfbfed to your computer and use it in GitHub Desktop.
Find the MSBuild executable in a PowerShell script and run a build script in the same directory
$msbuild = (Get-ItemProperty hklm:\software\Microsoft\MSBuild\ToolsVersions\4.0).MSBuildToolsPath
$MyDir = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)
. "$msbuild\msbuild.exe" "$MyDir\build.proj"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment