Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Msbuild 错误:多个包与指定的模式匹配:D:\a\r1\a\***.zip。请限制搜索模式_Msbuild_Azure Devops_Azure Pipelines - Fatal编程技术网

Msbuild 错误:多个包与指定的模式匹配:D:\a\r1\a\***.zip。请限制搜索模式

Msbuild 错误:多个包与指定的模式匹配:D:\a\r1\a\***.zip。请限制搜索模式,msbuild,azure-devops,azure-pipelines,Msbuild,Azure Devops,Azure Pipelines,我已经创建了一个构建管道,它可以正常工作,并在最后发布工件 我还创建了一个发布管道,将RESTAPI部署到Azure web app 发布管道任务包含以下信息: $(System.DefaultWorkingDirectory)/**/*.zip 但是我得到了这个错误: Error: More than one package matched with specified pattern: D:\a\r1\a\**\*.zip. Please restrain the search patte

我已经创建了一个构建管道,它可以正常工作,并在最后发布工件

我还创建了一个发布管道,将RESTAPI部署到Azure web app

发布管道任务包含以下信息:

$(System.DefaultWorkingDirectory)/**/*.zip
但是我得到了这个错误:

Error: More than one package matched with specified pattern: D:\a\r1\a\**\*.zip. Please restrain the search pattern.
当我看到drop文件夹时,我确实可以看到按日期排列的文件夹和几个.zip文件

webapi位于drop root中,但也位于显示的文件夹中

我一直无法找到每次如何清理整个drop文件夹,或者如何避免此错误

更新1:

在构建管道中,我可以看到何时发布:

##[section]Starting: Publish Artifact: webapidrops
==============================================================================
Task         : Publish Build Artifacts
Description  : Publish build artifacts to Azure Pipelines/TFS or a file share
Version      : 1.142.2
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=708390)
==============================================================================
##[section]Async Command Start: Upload Artifact
Uploading 31 files
Uploading 'webapidrops/2019_04/04_06_58/LuloWebApi.zip' (16%)
Uploading 'webapidrops/LuloWebApi.zip' (16%)
Uploading 'webapidrops/LuloWebApi.zip' (33%)
Uploading 'webapidrops/LuloWebApi.zip' (50%)
Uploading 'webapidrops/LuloWebApi.zip' (66%)
Uploading 'webapidrops/LuloWebApi.zip' (83%)
Uploading 'webapidrops/LuloWebApi.zip' (100%)
File upload succeed.
Upload 'D:\a\1\a' to file container: '#/1483345/webapidrops'
Associated artifact 387 with build 125
##[section]Async Command End: Upload Artifact
##[section]Finishing: Publish Artifact: webapidrops

zip
文件来自您的构建管道。如果您只需要LuloWebApi.zip,那么将构建管道发布工件任务配置为只执行此任务

如果您的发行版还需要第二个zip,以便可以在发行版中指定LuloWebApi.zip:

$(System.DefaultWorkingDirecotry)/**/LuloWebApi.zip
或者,您提到日期文件夹中也存在zip,因此请指定此文件夹:

$(System.DefaultWorkingDirectory)/**/**/*.zip

我的问题是我在同一个解决方案中有一个MVC项目和一个API项目——创建一个POC。 我删除了MVC项目(通过VisualStudio)。但是,物理文件仍然是源代码管理的一部分


当部署(通过Azure DevOps)时,它仍然将两个项目作为工件的一部分并抛出该错误。

第二个选项不起作用,我仍然有以下选项:多个与指定模式匹配的包:D:\a\r1\a*****.zip。请限制搜索模式。你需要所有的zip文件吗?我只需要那个zip文件,有没有办法只发布那个文件?这是我在发布管道上发布到azure的操作,我在那里尝试了所有模式的组合,有时它说有多个zip文件,有时它说找不到该文件。。。在您的发行版中,尝试删除一个
/**
$(…)/**/LuloWebApi.zip