TFS 2015.1 - vNext - 使用 NuGet Packager 但无法创建包,参数无效
TFS 2015.1 - vNext - Using NuGet Packager but can't create package, invalid arguments
我正在使用 TFS 2015.1(本地而非 VSO),尝试构建到 CI。问题是,当使用 TFS "Nuget Packager" 时,无法从 csproj 文件创建 nuget 包。相同的项目可以使用相同的参数在我的机器上本地创建。
谁能告诉我为什么?谢谢
这是打包程序日志:
2016-04-13T17:37:34.3861624Z Set workingFolder to default: C:\TFS Build Agent\agent\tasks\NuGetPackager[=10=].1.56
2016-04-13T17:37:34.3881631Z Executing the powershell script: C:\TFS Build Agent\agent\tasks\NuGetPackager[=10=].1.56\NuGetPackager.ps1
2016-04-13T17:37:34.5071696Z Checking pattern is specified
2016-04-13T17:37:34.5081742Z No Pattern found in solution parameter.
2016-04-13T17:37:34.5121695Z Found files: 1
2016-04-13T17:37:34.5141691Z --File: C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj
2016-04-13T17:37:34.5151718Z Creating Nuget Arguments:
2016-04-13T17:37:34.5231689Z --ARGS: pack C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent\_work\s -Properties Configuration=Debug
2016-04-13T17:37:34.5241691Z Invoking nuget with pack C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent\_work\s -Properties Configuration=Debug on C:\TFS Build Agent\agent\_work\s
2016-04-13T17:37:34.5241691Z C:\TFS Build Agent\agent\agent\worker\tools\NuGet.exe pack C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent\_work\s -Properties Configuration=Debug
2016-04-13T17:37:34.9111884Z pack: invalid arguments.
2016-04-13T17:37:34.9321907Z usage: nuget pack <nuspec | project> [options]
2016-04-13T17:37:34.9321907Z Creates a NuGet package based on the specified nuspec or project file.
2016-04-13T17:37:34.9331905Z Specify the location of the nuspec or project file to create a package.
2016-04-13T17:37:34.9331905Z options:
2016-04-13T17:37:34.9341894Z -OutputDirectory Specifies the directory for the created NuGet package file. If not specified, uses the current directory.
2016-04-13T17:37:34.9341894Z -BasePath The base path of the files defined in the nuspec file.
2016-04-13T17:37:34.9341894Z -Verbose Shows verbose output for package building.
2016-04-13T17:37:34.9351910Z -Version Overrides the version number from the nuspec file.
2016-04-13T17:37:34.9351910Z -Exclude + Specifies one or more wildcard patterns to exclude when creating a package.
2016-04-13T17:37:34.9361907Z -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-04-13T17:37:34.9361907Z -Tool Determines if the output files of the project should be in the tool folder.
2016-04-13T17:37:34.9371921Z -Build Determines if the project should be built before building the package.
2016-04-13T17:37:34.9371921Z -NoDefaultExcludes Prevent default exclusion of NuGet package files and files and folders starting with a dot e.g. .svn.
2016-04-13T17:37:34.9371921Z -NoPackageAnalysis Specify if the command should not run package analysis after building the package.
2016-04-13T17:37:34.9381908Z -ExcludeEmptyDirectories Prevent inclusion of empty directories when building the package.
2016-04-13T17:37:34.9381908Z -IncludeReferencedProjects Include referenced projects either as dependencies or as part of the package.
2016-04-13T17:37:34.9391903Z -Properties + Provides the ability to specify a semicolon ";" delimited list of properties when creating a package.
2016-04-13T17:37:34.9391903Z -MinClientVersion Set the minClientVersion attribute for the created package.
2016-04-13T17:37:34.9401904Z -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-04-13T17:37:34.9401904Z -Help (?) help
2016-04-13T17:37:34.9401904Z -Verbosity Display this amount of details in the output: normal, quiet, detailed.
2016-04-13T17:37:34.9411909Z -NonInteractive Do not prompt for user input or confirmations.
2016-04-13T17:37:34.9411909Z For more information, visit http://docs.nuget.org/docs/reference/command-line-reference
构建服务器上 运行 的位置似乎有问题:
C:\TFS Build Agent\agent\agent\worker\tools\NuGet.exe pack C:\TFS
Build Agent\agent_work\s\WebFeatureService.csproj -OutputDirectory
C:\TFS Build Agent\agent_work\s -Properties Configuration=Debug
由于 CSPROJ 文件路径周围缺少引号,这可能在服务器上遇到问题。
在我的 VSTS 托管生成代理上,所有内容都在 C:\a\s\...
中执行。
尝试更改代理的本地安装。
如果确实如此,请告诉我,我想我知道需要做些什么来解决它。
我正在使用 TFS 2015.1(本地而非 VSO),尝试构建到 CI。问题是,当使用 TFS "Nuget Packager" 时,无法从 csproj 文件创建 nuget 包。相同的项目可以使用相同的参数在我的机器上本地创建。
谁能告诉我为什么?谢谢
这是打包程序日志:
2016-04-13T17:37:34.3861624Z Set workingFolder to default: C:\TFS Build Agent\agent\tasks\NuGetPackager[=10=].1.56
2016-04-13T17:37:34.3881631Z Executing the powershell script: C:\TFS Build Agent\agent\tasks\NuGetPackager[=10=].1.56\NuGetPackager.ps1
2016-04-13T17:37:34.5071696Z Checking pattern is specified
2016-04-13T17:37:34.5081742Z No Pattern found in solution parameter.
2016-04-13T17:37:34.5121695Z Found files: 1
2016-04-13T17:37:34.5141691Z --File: C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj
2016-04-13T17:37:34.5151718Z Creating Nuget Arguments:
2016-04-13T17:37:34.5231689Z --ARGS: pack C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent\_work\s -Properties Configuration=Debug
2016-04-13T17:37:34.5241691Z Invoking nuget with pack C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent\_work\s -Properties Configuration=Debug on C:\TFS Build Agent\agent\_work\s
2016-04-13T17:37:34.5241691Z C:\TFS Build Agent\agent\agent\worker\tools\NuGet.exe pack C:\TFS Build Agent\agent\_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent\_work\s -Properties Configuration=Debug
2016-04-13T17:37:34.9111884Z pack: invalid arguments.
2016-04-13T17:37:34.9321907Z usage: nuget pack <nuspec | project> [options]
2016-04-13T17:37:34.9321907Z Creates a NuGet package based on the specified nuspec or project file.
2016-04-13T17:37:34.9331905Z Specify the location of the nuspec or project file to create a package.
2016-04-13T17:37:34.9331905Z options:
2016-04-13T17:37:34.9341894Z -OutputDirectory Specifies the directory for the created NuGet package file. If not specified, uses the current directory.
2016-04-13T17:37:34.9341894Z -BasePath The base path of the files defined in the nuspec file.
2016-04-13T17:37:34.9341894Z -Verbose Shows verbose output for package building.
2016-04-13T17:37:34.9351910Z -Version Overrides the version number from the nuspec file.
2016-04-13T17:37:34.9351910Z -Exclude + Specifies one or more wildcard patterns to exclude when creating a package.
2016-04-13T17:37:34.9361907Z -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-04-13T17:37:34.9361907Z -Tool Determines if the output files of the project should be in the tool folder.
2016-04-13T17:37:34.9371921Z -Build Determines if the project should be built before building the package.
2016-04-13T17:37:34.9371921Z -NoDefaultExcludes Prevent default exclusion of NuGet package files and files and folders starting with a dot e.g. .svn.
2016-04-13T17:37:34.9371921Z -NoPackageAnalysis Specify if the command should not run package analysis after building the package.
2016-04-13T17:37:34.9381908Z -ExcludeEmptyDirectories Prevent inclusion of empty directories when building the package.
2016-04-13T17:37:34.9381908Z -IncludeReferencedProjects Include referenced projects either as dependencies or as part of the package.
2016-04-13T17:37:34.9391903Z -Properties + Provides the ability to specify a semicolon ";" delimited list of properties when creating a package.
2016-04-13T17:37:34.9391903Z -MinClientVersion Set the minClientVersion attribute for the created package.
2016-04-13T17:37:34.9401904Z -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-04-13T17:37:34.9401904Z -Help (?) help
2016-04-13T17:37:34.9401904Z -Verbosity Display this amount of details in the output: normal, quiet, detailed.
2016-04-13T17:37:34.9411909Z -NonInteractive Do not prompt for user input or confirmations.
2016-04-13T17:37:34.9411909Z For more information, visit http://docs.nuget.org/docs/reference/command-line-reference
构建服务器上 运行 的位置似乎有问题:
C:\TFS Build Agent\agent\agent\worker\tools\NuGet.exe pack C:\TFS Build Agent\agent_work\s\WebFeatureService.csproj -OutputDirectory C:\TFS Build Agent\agent_work\s -Properties Configuration=Debug
由于 CSPROJ 文件路径周围缺少引号,这可能在服务器上遇到问题。
在我的 VSTS 托管生成代理上,所有内容都在 C:\a\s\...
中执行。
尝试更改代理的本地安装。
如果确实如此,请告诉我,我想我知道需要做些什么来解决它。