Last active
December 16, 2015 18:59
-
-
Save jbtule/5481716 to your computer and use it in GitHub Desktop.
Create,Publish Nuget Package w/ Symbols&Source
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
@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>" |
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
@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>" |
score!
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
You actually can get rid of line 3 in create-nuget.bat.
Line 4 creates both the nupkg and the symbols.nupkg.