You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Visual Studio发布ContainerApp构建失败:缓存键计算错误

Azure Container Apps发布失败:failed to compute cache key(项目复制错误)

环境信息

  • Windows 11
  • Visual Studio 17.3.4
  • Docker Desktop 4.12.0(基于WSL2)

目录结构

\SolutionDir
    \FR911.Worker.Project1
        Dockerfile
        FR911.Worker.Project1.csproj
    \FR911.Worker.Project2
        Dockerfile
        FR911.Worker.Project2.csproj

问题描述

同一解决方案下的两个ContainerApp项目,本地通过Docker Desktop构建运行均无异常,但发布至Azure Container Apps时出现差异:

  • FR911.Worker.Project1可正常完成发布
  • FR911.Worker.Project2发布失败,报错「failed to compute cache key」,构建日志显示执行COPY步骤时无法找到目标项目文件

两个项目的Dockerfile结构完全一致,项目文件(.csproj)仅容器名称、部署环境名称不同,均以.NET 6.0为目标框架、针对Linux平台。Visual Studio执行的Docker构建命令仅路径和项目名称存在差异,目前无法定位具体失败原因。

内容的提问来源于stack exchange,提问作者pseabury

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 09:10:23