Skip to content

Commit 493b576

Browse files
authored
Merge pull request #1458 from libgit2/ethomson/nuget_msbuild
nuget: don't try to find msbuild (incorrectly)
2 parents a0e1f07 + 5959d83 commit 493b576

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

nuget.package/BuildNugetPackage.ps1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ function Clean-OutputFolder($folder) {
5252
}
5353
}
5454

55-
# From http://www.dougfinke.com/blog/index.php/2010/12/01/note-to-self-how-to-programmatically-get-the-msbuild-path-in-powershell/
56-
57-
Function Get-MSBuild {
58-
$lib = [System.Runtime.InteropServices.RuntimeEnvironment]
59-
$rtd = $lib::GetRuntimeDirectory()
60-
Join-Path $rtd msbuild.exe
61-
}
62-
6355
#################
6456

6557
$root = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
@@ -79,7 +71,7 @@ Push-Location $projectPath
7971
try {
8072
Set-Content -Encoding ASCII $(Join-Path $projectPath "libgit2sharp_hash.txt") $commitSha
8173
Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Restore "$slnPath" }
82-
Run-Command { & (Get-MSBuild) "$slnPath" "/verbosity:minimal" "/p:Configuration=Release" }
74+
Run-Command { & "MSBuild.exe" "$slnPath" "/verbosity:minimal" "/p:Configuration=Release" }
8375

8476
If ($postBuild) {
8577
Write-Host -ForegroundColor "Green" "Run post build script..."

0 commit comments

Comments
 (0)