TFS生成配置-Nuget Publisher
我们正在使用TFS和nexus软件包管理器。对于CI,我们有Nuget Publisher任务 对于nupkg的路径/模式,我写了:TFS生成配置-Nuget Publisher,tfs,build,devops,Tfs,Build,Devops,我们正在使用TFS和nexus软件包管理器。对于CI,我们有Nuget Publisher任务 对于nupkg的路径/模式,我写了:“^((?!SNAPSHOT)。*nupkg;-:**/packages/^((?!SNAPSHOT)。*nupkg;-:^((?!SNAPSHOT)。*nupkg” 我想说的是,获取文件名中不包含快照的nupkg文件 1-C:_work\2\s\test-project.1.0.1-SNAPSHOT-umut.nupkg 2-C:_work\2\s\test-p
“^((?!SNAPSHOT)。*nupkg;-:**/packages/^((?!SNAPSHOT)。*nupkg;-:^((?!SNAPSHOT)。*nupkg”
我想说的是,获取文件名中不包含快照的nupkg文件
- 1-C:_work\2\s\test-project.1.0.1-SNAPSHOT-umut.nupkg
- 2-C:_work\2\s\test-project.1.0.1.nupkg
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
nupkg的路径/模式
参数不支持代码>通配符,它支持:
您需要使用powershell脚本来筛选和发布包
@中的TetraDev提供了一个powershell脚本,用于将NuGet包批量推送到VSTS源。它将忽略任何.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
}
谢谢你的回答。但我认为图像url是错误的。你能检查这个吗?对不起,哪个url?你写的是“it支持”,但图片url无效。你可以检查这里:。“设置位置C:\u work\2\b\$files=get childitem |其中{$\u.Name-like.nupkg”-和$\u.Name-notlike”*symbols”}对于这段代码,它的运行并找到了我想要的包。但是对于这段代码,“\NuGet.exe push-Source“MySource”-ApiKey key$file.name”我得到一个错误。2018-07-25T08:43:47.7000752Z##[错误]C:_-work\2\b\nuget.exe:术语“C:_-work\2\b\nuget.exe”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。检查名称的拼写,或者是否包含路径,