[英]TFS Build Configuration - Nuget Publisher
We are using TFS and nexus package manager. 我们正在使用TFS和nexus软件包管理器。 For the CI we have Nuget Publisher task.
对于CI,我们有Nuget Publisher任务。
For the Path/Pattern to nupkg I wrote: "^((?!SNAPSHOT).)*nupkg;-:**/packages/^((?!SNAPSHOT).)*nupkg;-:^((?!SNAPSHOT).)*nupkg"
对于nupkg的路径/模式,我写道:
"^((?!SNAPSHOT).)*nupkg;-:**/packages/^((?!SNAPSHOT).)*nupkg;-:^((?!SNAPSHOT).)*nupkg"
I want to say take nupkg files which do not contain SNAPSHOT in the file name . 我想说的是,在文件名中不包含SNAPSHOT的nupkg文件 。
I want to take the second file. 我想取第二个文件。
But when I start the build, I get the error: 但是当我开始构建时,出现错误:
Starting: NuGet Publisher
******************************************************************************
==============================================================================
Task : NuGet Publisher
Description : Deprecated: use the “NuGet” task instead. It works with the new Tool Installer framework so you can easily use new versions of NuGet without waiting for a task update, provides better support for authenticated feeds outside this account/collection, and uses NuGet 4 by default.
Version : 0.2.37
Author : Lawrence Gripper
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=627417)
==============================================================================
C:\Windows\system32\chcp.com 65001
Active code page: 65001
Error: No matching files were found with search pattern: C:\_work\2\s\**\*^((?!SNAPSHOT).)*nupkg;-:**\packages\**\*^((?!SNAPSHOT).)*nupkg;-:**\*^((?!SNAPSHOT).)*nupkg
Packages failed to publish
******************************************************************************
Finishing: NuGet Publisher
Path/Pattern to nupkg
argument doesn't support !
Path/Pattern to nupkg
参数的Path/Pattern to nupkg
不支持!
wildcard, it supports: 通配符,它支持:
You need to use powershell script to filter and publish the packages. 您需要使用powershell脚本来过滤和发布程序包。
@TetraDev in this post provides a powershell script to bulk push NuGet packages to a VSTS feed. @TetraDev在这篇文章提供了一个PowerShell脚本批量推的NuGet包到VSTS饲料。 It will ignore any of the .symbols.nuget files:
它将忽略任何.symbols.nuget文件:
set-location \\path\to\nugetpackages
$files=get-childitem | where {$_.Name -like "*.nupkg" -and $_.Name -notlike "*symbols*"}
foreach($file in $files) {
.\NuGet.exe push -Source "MySource" -ApiKey key $file.name
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.