Last active
May 23, 2017 21:33
-
-
Save nkolev92/812a3b84ff8eff1012a34b0749ee0a3e to your computer and use it in GitHub Desktop.
NuGet Client Development Productivity Tips & Tricks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$nugetClientRoot="C:\Code\Nuget.Client" | |
Function Run-NuGetTargetsCustom($projectPath, $target, $extra) | |
{ | |
$buildPath = Join-Path $nugetClientRoot "src\NuGet.Core\NuGet.Build.Tasks" | |
$publishDllPath = Join-Path $nugetClientRoot "artifacts\NuGet.Build.Tasks\15.0\bin\Debug\net45\NuGet.Build.Tasks.dll" | |
$targetsPath = Join-Path $nugetClientRoot "src\NuGet.Core\NuGet.Build.Tasks\NuGet.targets" | |
Write-Host "msbuild $projectPath /t:$target /p:NuGetRestoreTargets=$targetsPath /p:RestoreTaskAssemblyFile=$publishDllPath $extra" | |
& msbuild $projectPath /t:$target /p:NuGetRestoreTargets=$targetsPath /p:RestoreTaskAssemblyFile=$publishDllPath $extra | |
} | |
#Example usage: | |
# Run-NuGetTargetsCustom solution.sln GenerateRestoreGraphFile /p:RestoreGraphOutputPath="out.dg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment