Skip to content

Instantly share code, notes, and snippets.

@Fireforge
Last active January 27, 2016 21:48
Show Gist options
  • Save Fireforge/65b2fa7950973fdc3657 to your computer and use it in GitHub Desktop.
Save Fireforge/65b2fa7950973fdc3657 to your computer and use it in GitHub Desktop.
Nuget Package push Powershell script
#
# push.ps1
#
# A simple script to package and push a Nuget package from a Visual Studio C# project.
# `nuget.exe` must be on the path or otherwise available to the script (Package Manager Console)
Set-Location -Path $PSScriptRoot
# project parameters
$projname = "MyProject"
$pushdir = "path\to\nupkgs"
rm *.nupkg
# Push out the release version for use in portable apps
nuget pack $PSScriptRoot\$projname.csproj -build
$nupkg = ls *.nupkg
nuget push -source $pushdir $nupkg
rm $nupkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment