Ian Beeson
Ian Beeson

Reputation: 65

VSO using Nuget packager build agent fails with invalid properites

I'm using VSO to package a simple DLL and the publish it to an internal feed, unfortunately during the packaging stage build it reports success but I get no artifact to publish

In the log file on for the publish it states the packing includes invalid arguments (Log 2016-02-27T09:07:35.8808468Z) as a result the publisher can't file any .nupkg file to publish.

I'm not sure where I'm going wrong. Its as if the nuget.exe is the wrong version or do it need to include anything in my solution this is just a basic .enter image description herecsproj library with one static function for testing the process.

packager log

2016-02-27T09:07:35.2714664Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPackager\0.1.57
2016-02-27T09:07:35.2714664Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPackager\0.1.57\NuGetPackager.ps1
2016-02-27T09:07:35.4277177Z Checking pattern is specified
2016-02-27T09:07:35.4433431Z No Pattern found in solution parameter.
2016-02-27T09:07:35.4433431Z Found files: 1
2016-02-27T09:07:35.4589718Z --File: "C:\a\1\s\NugetTestLibrary\NugetTestLibrary.csproj"
2016-02-27T09:07:35.4589718Z Creating Nuget Arguments:
2016-02-27T09:07:35.4589718Z --ARGS: pack "C:\a\1\s\NugetTestLibrary\NugetTestLibrary.csproj" -OutputDirectory "C:\a\1\a" -Properties Configuration=${BuildConfiguration};Platform any cpu
2016-02-27T09:07:35.4589718Z Invoking nuget with pack "C:\a\1\s\NugetTestLibrary\NugetTestLibrary.csproj" -OutputDirectory "C:\a\1\a" -Properties Configuration=${BuildConfiguration};Platform any cpu on C:\a\1\s\NugetTestLibrary
2016-02-27T09:07:35.4747124Z C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\tools\NuGet.exe pack "C:\a\1\s\NugetTestLibrary\NugetTestLibrary.csproj" -OutputDirectory "C:\a\1\a" -Properties Configuration=${BuildConfiguration};Platform any cpu
2016-02-27T09:07:35.8808468Z pack: invalid arguments.
2016-02-27T09:07:35.8964722Z usage: nuget pack <nuspec | project> [options]
2016-02-27T09:07:35.8964722Z Creates a NuGet package based on the specified nuspec or project file.
2016-02-27T09:07:35.8964722Z      Specify the location of the nuspec or project file to create a package.
2016-02-27T09:07:35.8964722Z options:
2016-02-27T09:07:35.8964722Z  -OutputDirectory                                                          Specifies the directory for the created NuGet package file. If not specified, uses the current directory.
2016-02-27T09:07:35.8964722Z  -BasePath                                                                 The base path of the files defined in the nuspec file.
2016-02-27T09:07:35.8964722Z  -Verbose                                                                  Shows verbose output for package building.
2016-02-27T09:07:35.8964722Z  -Version                                                                  Overrides the version number from the nuspec file.
2016-02-27T09:07:35.9120964Z  -Exclude +                                                                Specifies one or more wildcard patterns to exclude when creating a package.
2016-02-27T09:07:35.9120964Z  -Symbols                                                                  Determines if a package containing sources and symbols should be created. When specified with a nuspec, creates a regular NuGet package file and the corresponding symbols package.
2016-02-27T09:07:35.9120964Z  -Tool                                                                     Determines if the output files of the project should be in the tool folder. 
2016-02-27T09:07:35.9120964Z  -Build                                                                    Determines if the project should be built before building the package.
2016-02-27T09:07:35.9120964Z  -NoDefaultExcludes                                                        Prevent default exclusion of NuGet package files and files and folders starting with a dot e.g. .svn.
2016-02-27T09:07:35.9120964Z  -NoPackageAnalysis                                                        Specify if the command should not run package analysis after building the package.
2016-02-27T09:07:35.9120964Z  -ExcludeEmptyDirectories                                                  Prevent inclusion of empty directories when building the package.
2016-02-27T09:07:35.9120964Z  -IncludeReferencedProjects                                                Include referenced projects either as dependencies or as part of the package.
2016-02-27T09:07:35.9120964Z  -Properties +                                                             Provides the ability to specify a semicolon ";" delimited list of properties when creating a package.
2016-02-27T09:07:35.9120964Z  -MinClientVersion                                                         Set the minClientVersion attribute for the created package.
2016-02-27T09:07:35.9120964Z  -MSBuildVersion                                                           Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.
2016-02-27T09:07:35.9120964Z  -Help                           (?)                                       help
2016-02-27T09:07:35.9120964Z  -Verbosity                                                                Display this amount of details in the output: normal, quiet, detailed.
2016-02-27T09:07:35.9120964Z  -NonInteractive                                                           Do not prompt for user input or confirmations.
2016-02-27T09:07:35.9120964Z For more information, visit http://docs.nuget.org/docs/reference/command-line-reference

Upvotes: 1

Views: 434

Answers (1)

Ian Beeson
Ian Beeson

Reputation: 65

Unfortunately I copied the Configuration=${BuildConfiguration} parameter incorrectly (use {} instead of ()), I also had to make other changes , I didn't require the platform parameter. I was also packaging to the incorrect folder.

Upvotes: 2

Related Questions