首页 文章

Visual Studio Team Services发布/部署失败 - “找不到包含指定模式的包”

提问于
浏览
15

我正在尝试实现持续集成和持续部署到我的DEV Azure应用服务 . 我在Visual Studio Team Services上使用托管代理 . 我的发行版定义中的“将网站部署到Azure”步骤仍然失败,并显示错误“找不到包含指定模式的包” . 有任何想法吗?

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

2 回答

  • 3

    由于您在任务的"Package or Folder"设置中输入"xxx*.zip",因此任务找到2个或更多包时通常会发生"More than one package matched with specified pattern. Please restrain the search patern [sic]."错误 . 所以你只需要更新它来指定详细的包名 . 类似的问题:Deploy azure website and webjobs in same sln using VSO - Error - There can be only one .

    对于原始问题,您还可以通过创建新的构建定义来修复它,在“构建”选项卡上选择“Visual Studio”,在“部署”选项卡上选择“Azure WebApp” . 这将创建一个构建定义,并添加所需的arugments .

  • 25

    几个小时前有同样的问题 . 这就是我如何解决这个问题:

    • 确保构建解决方案步骤中的MSBuild参数为:/ p:DeployOnBuild = true / p:WebPublishMethod = Package / p:PackageAsSingleFile = true / p:SkipInvalidConfigurations = true / p:PackageLocation =“$(build.artifactstagingdirectory)\”

    • 添加步骤Azure应用服务部署:ARM

    • 配置订阅和应用服务名称

    • 包或文件夹应为 $(build.artifactstagingdirectory)\**\*.zip

    脚步:

    Step definitions

    Azure应用服务部署配置:

    enter image description here

相关问题