Skip to content

Instantly share code, notes, and snippets.

@jbtule
Last active December 16, 2015 18:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jbtule/5481716 to your computer and use it in GitHub Desktop.
Save jbtule/5481716 to your computer and use it in GitHub Desktop.
Create,Publish Nuget Package w/ Symbols&Source
@echo off
IF %1.==. GOTO WrongArgs
..\.nuget\nuget.exe pack ..\%1\%1.csproj -Build -Properties Configuration=Release -Symbols
GOTO:EOF
:WrongArgs
ECHO "create-nuget <projectname>"
@echo off
IF %2.==. GOTO WrongArgs
set NUGETSOURCE="Http_Or_UNC_PATH_NugetRepo"
set SYMBOLSOURCE="HTTP_Symbol_Server"
..\.nuget\nuget.exe push %1.nupkg %2 -source %NUGETSOURCE%
..\.nuget\nuget.exe push %1.symbols.nupkg %2 -source %SYMBOLSOURCE%
GOTO:EOF
:WrongArgs
ECHO "publish-nuget <pkgname> <apikey>"
@xavierdecoster
Copy link

You actually can get rid of line 3 in create-nuget.bat.
Line 4 creates both the nupkg and the symbols.nupkg.

@jbtule
Copy link
Author

jbtule commented Apr 29, 2013

score!

@TripleEmcoder
Copy link

I'd even say "can" -> "should", because nuget.exe pack csproj does a build on each run, which would cause the 2 packages to be mismatched. Each build produces a slightly different (timestamps, checksums) set of DLLs and PDBs, which are generally incompatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment