Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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