Skip to content

Instantly share code, notes, and snippets.

View nkolev92's full-sized avatar

Nikolche Kolev nkolev92

View GitHub Profile
@nkolev92
nkolev92 / PowershellFunctions.ps1
Last active May 23, 2017 21:33
NuGet Client Development Productivity Tips & Tricks
$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
}