This project has moved and is read-only. For the latest updates, please go here.

Packages won't pushed

Feb 5, 2015 at 2:55 PM
I´m using your nuget package to create and push packages to my private feed.
First of all I had to modify the New-NuGetPackage.ps1 due to the german version of nuget:
$NUGET_EXE_SUCCESSFULLY_CREATED_PACKAGE_MESSAGE_REGEX = [regex] "(?i)(Das Paket \`"(?<FilePath>.*?)\`".)"
After that all worked fine, but for a unknown reason the script won´t push my packages to my feed.
In the config.ps1 I only defined $sourceToUploadTo and $apiKey.
Here is the output of Visual Studio and your scripts:
Creating NuGet package in Post-Build event...
1>  ProjectFilePath parameter value passed to script is 'C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\CommonExtensions.csproj'.
1>  OutputDirectory parameter value passed to script is 'C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\bin\x86\Release\'.
1>  BuildConfiguration parameter value passed to script is 'Release'.
1>  BuildPlatform parameter value passed to script is 'x86'.
1>  Using default Version Number value.
1>  Using default Release Notes value.
1>  Using default Configuration value.
1>  Using default Platform value.
1>  Using default Pack Properties value.
1>  Using default Pack Options value.
1>  Pre-processing the project file to make sure the assembly exists where NuGet.exe will expect it to be, started at 15:52:30.1874519.
1>  The Output Directory is the same as defined in the project file, so no pre-processing actions were required.
1>  Pre-processing the project file finished running at 15:52:30.2873356. Completed in 0,0998837 seconds.
1>  AUSFÜHRLICH: New-NuGetPackage script started running at 15:52:30.4956334.
1>  AUSFÜHRLICH: Using PowerShell Version: 5.0.9926.6.
1>  AUSFÜHRLICH: Using NuGet Version: 2.8.50506.491.
1>  AUSFÜHRLICH: About to run Pack command '& 
1>  "C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\_CreateNewNuGetPackage\DoNotModify\NuGet.exe
1>  " pack "C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\CommonExtensions.csproj" 
1>  -OutputDirectory "C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\bin\x86\Release" 
1>  -Properties Configuration="Release"`;Platform="x86" -NonInteractive '.
1>  AUSFÜHRLICH: Es wird versucht, das Paket aus "CommonExtensions.csproj" zu erstellen.
1>  Paketerstellung der Dateien aus 
1>  "C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\bin\x86\Release".
1>  "packages.config" wurde gefunden. Die aufgelisteten Pakete werden als Abhängigkeiten verwendet.
1>  Das Paket 
1>  "C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\bin\x86\Release\CommonExtensions.1.0.5514.41
1>  07.nupkg" wurde erfolgreich erstellt.
1>  C:\Users\Nico\Projekte\CommonExtensions\CommonExtensions\CommonExtensions\bin\x86\Release\CommonExtensions.1.0.5514.4107.nupkg
1>  AUSFÜHRLICH: Performing any required New-NuGetPackage script cleanup...
1>  AUSFÜHRLICH: New-NuGetPackage script finished running at 15:52:31.4815800. Completed in 0,9859466 seconds.
1>Done executing task "Exec".
Can you tell me what is wrong here now?
Feb 7, 2015 at 5:07 PM
Edited Feb 7, 2015 at 5:07 PM
Packages aren't pushed by default after building, since that would push a ton of packages needlessly to your feed; you have to manually tell it to push. If you are building manually, you just need to run the RunMeToUploadNuGetPackage.cmd file that appears in the same directory as the Config.ps1 file. See the documentation page for more details.

If you are wanting to automate the process as part of your build, then you will want to call the New-NuGetPackage.ps1 file with the proper arguments from your build process.

Let me know if you are still confused or have any more questions :)