Azure DevOps-八达通的软件包应用程序:System.IO.IOException:参数不正确*

Azure DevOps-八达通的软件包应用程序:System.IO.IOException:参数不正确*,azure,azure-devops,octopus-deploy,azure-devops-pipelines,octopus,Azure,Azure Devops,Octopus Deploy,Azure Devops Pipelines,Octopus,我正在尝试将我的应用程序打包成一个zip文件,以便将其发送给八达通 日志如下所示: 2021-05-17T21:15:00.8077153Z D:\a\r1\a>dotnet "C:\hostedtoolcache\windows\octo\7.4.3213\x64\/octo.dll" pack "--id=KFPortal" "--format=Zip" "--version=1.0.19" "-

我正在尝试将我的应用程序打包成一个zip文件,以便将其发送给八达通

日志如下所示:

2021-05-17T21:15:00.8077153Z D:\a\r1\a>dotnet "C:\hostedtoolcache\windows\octo\7.4.3213\x64\/octo.dll" pack "--id=KFPortal" "--format=Zip" "--version=1.0.19" "--compressionlevel=optimal" "--outFolder=D:\a\r1\a" "--basePath=D:\a\r1\a\_KFPortal-CI\drop\19.zip" "--overwrite=false" 
2021-05-17T21:15:05.3741444Z Setting Zip compression level to Optimal
2021-05-17T21:15:05.3940706Z Packing KFPortal version "1.0.19"...
2021-05-17T21:15:05.4077016Z Saving "KFPortal.1.0.19.zip" to "D:\a\r1\a"...
2021-05-17T21:15:05.4095140Z Adding files from "D:\a\r1\a\_KFPortal-CI\drop\19.zip" matching pattern "**"
2021-05-17T21:15:06.7197552Z 
2021-05-17T21:15:06.7200093Z System.IO.IOException: The parameter is incorrect : 'D:\a\r1\a\_KFPortal-CI\drop\19.zip'
2021-05-17T21:15:06.7200973Z    at System.IO.Enumeration.FileSystemEnumerator`1.GetData()
2021-05-17T21:15:06.7201594Z    at System.IO.Enumeration.FileSystemEnumerator`1.FindNextEntry()
2021-05-17T21:15:06.7202125Z    at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
2021-05-17T21:15:06.7202656Z    at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
2021-05-17T21:15:06.7203234Z    at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
2021-05-17T21:15:06.7203850Z    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
2021-05-17T21:15:06.7204507Z    at NuGet.Common.PathResolver.PerformWildcardSearch(String basePath, String searchPath, Boolean includeEmptyDirectories, String& normalizedBasePath)
2021-05-17T21:15:06.7205322Z    at NuGet.Common.PathResolver.PerformWildcardSearch(String basePath, String searchPath)
2021-05-17T21:15:06.7206400Z    at Octopus.Cli.Commands.Package.ZipPackageBuilder.BuildPackage(String basePath, IList`1 includes, ManifestMetadata metadata, String outFolder, Boolean overwrite, Boolean verboseInfo) in C:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\Commands\Package\ZipPackageBuilder.cs:line 62
2021-05-17T21:15:06.7208001Z    at Octopus.Cli.Commands.Package.PackCommand.<>c__DisplayClass21_0.<Execute>b__0() in C:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\Commands\Package\PackCommand.cs:line 167
2021-05-17T21:15:06.7208829Z    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2021-05-17T21:15:06.7209379Z --- End of stack trace from previous location where exception was thrown ---
2021-05-17T21:15:06.7209871Z    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
2021-05-17T21:15:06.7210349Z --- End of stack trace from previous location where exception was thrown ---
2021-05-17T21:15:06.7210984Z    at Octopus.Cli.CliProgram.Run(String[] args) in C:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\CliProgram.cs:line 54
2021-05-17T21:15:06.7211497Z Exit code: -3
2021-05-17T21:15:06.7420731Z ##[error]Error: The process 'C:\hostedtoolcache\windows\octo\7.4.3213\x64\octo.cmd' failed with exit code 4294967293
2021-05-17T21:15:06.7437803Z ##[error]Failed to execute octo pack command. The process 'C:\hostedtoolcache\windows\octo\7.4.3213\x64\octo.cmd' failed with exit code 4294967293
2021-05-17T21:15:06.7489404Z ##[section]Finishing: Package KFPortal
2021-05-17T21:15:00.8077153Z D:\a\r1\a>dotnet“C:\hostedtoolcache\windows\octo\7.4.3213\x64\/octo.dll“pack”--id=KFPortal“”--format=Zip“”--version=1.0.19“”--compressionlevel=optimal”“--outFolder=D:\a\r1\a”“--basePath=D:\a\r1\a\\ KFPortal-CI drop\19.Zip”“--overwrite=false”
2021-05-17T21:15:05.3741444Z将压缩级别设置为最佳
2021-05-17T21:15:05.3940706Z包装KF门户版本“1.0.19”。。。
2021-05-17T21:15:05.4077016Z正在将“KFPortal.1.0.19.zip”保存到“D:\a\r1\a”。。。
2021-05-17T21:15:05.4095140Z从“D:\a\r1\a\\u KFPortal-CI\drop\19.zip”匹配模式添加文件***
2021-05-17T21:15:06.7197552Z
2021-05-17T21:15:06.7200093Z System.IO.IOException:参数不正确:“D:\a\r1\a\\u KFPortal-CI\drop\19.zip”
2021-05-17T21:15:06.7200973Z at System.IO.Enumeration.filesystemumerator`1.GetData()
2021-05-17T21:15:06.7201594Z at System.IO.Enumeration.filesystemumerator`1.FindNextEntry()
2021-05-17T21:15:06.7202125Z at System.IO.Enumeration.filesystemumerator`1.MoveNext()
2021-05-17T21:15:06.7202656Z at系统.集合.通用.LargearyBuilder`1.添加范围(IEnumerable`1项)
2021-05-17T21:15:06.7203234Z at System.Collections.Generic.Enumerableholpers.ToArray[T](IEnumerable`1源)
2021-05-17T21:15:06.7203850Z在System.Linq.Enumerable.ToArray[t源](IEnumerable`1源)
2021-05-17T21:15:06.7204507Z在NuGet.Common.PathResolver.PerformWildcardSearch(字符串基路径、字符串搜索路径、布尔值includeEmptyDirectories、字符串和规范化基路径)
2021-05-17T21:15:06.7205322Z在NuGet.Common.PathResolver.PerformWildcardSearch(字符串基本路径,字符串搜索路径)
2021-05-17T21:15:06.7206400Z在C:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\Commands\Package\ZipPackageBuilder.BuildPackage中的Octopus.Cli.Commands.ZipPackageBuilder.BuildPackage(String basePath,IList`1包括,ManifestMetadata元数据,String outFolder,Boolean overwrite,Boolean verboseInfo)中
2021-05-17T21:15:06.7208001Z在c:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\Commands\Package\PackCommand.c_u中显示Class21_0.b_u0()
2021-05-17T21:15:06.7208829Z在System.Threading.ExecutionContext.RunInternal(ExecutionContext ExecutionContext,ContextCallback回调,对象状态)
2021-05-17T21:15:06.7209379Z---来自引发异常的前一个位置的堆栈结束跟踪---
2021-05-17T21:15:06.7209871Z在System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task和currentTaskSlot)
2021-05-17T21:15:06.7210349Z---来自引发异常的前一个位置的堆栈结束跟踪---
2021-05-17T21:15:06.7210984Z在C:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\CliProgram.cs中的Octopus.CliProgram.Run(字符串[]args)处运行:第54行
2021-05-17T21:15:06.7211497Z出口代码:-3
2021-05-17T21:15:06.7420731Z###[错误]错误:进程“C:\hostedtoolcache\windows\octo\7.4.3213\x64\octo.cmd”失败,退出代码为4294967293
2021-05-17T21:15:06.7437803Z###[错误]无法执行octo pack命令。进程“C:\hostedtoolcache\windows\octo\7.4.3213\x64\octo.cmd”失败,退出代码为4294967293
2021-05-17T21:15:06.7489404Z###[章节]整理:包装
这是我的配置


我做错了什么?

我认为真正的问题是您没有为托管代理下的项目设置正确的源路径

如果您的回购分支机构拥有名为
\u KFPortal-CI
的文件夹,则应将源路径设置为

$(System.DefaultWorkingDirectory)/_KFPortal-CI

这就足够了,
drop
文件夹来自工件任务,只临时存在于工件任务中,在repos下不存在。

在构建工作目录中是否确实有名为
\u KFPortal-CI\drop\19.zip
的文件夹?如果这是前一阶段中的管道工件,则需要首先将其删除。