使用 AWS CodeBuild 构建 .Net6.0 应用程序时出现此错误:
Error: .NET binaries for Lambda function are not correctly installed in the /var/task directory of the image when the image was built. The /var/task directory is missing the required .deps.json file.
这是 buildspec.yaml:
---
phases:
install:
runtime-versions:
dotnet: 6.0
build:
commands:
- dotnet restore -p:PublishReadyToRun=true -p:PublishTrimmed=true
- dotnet publish --framework net6.0 --runtime linux-x64
post_build:
commands:
- aws cloudformation package --s3-bucket ${s3Bucket} --s3-prefix ${prefix}/artifacts --template-file ${templateFile} --output-template-file ${outputTemplate} --region ${region}
CodeBuild 项目配置为在“aws/codebuild/amazonlinux2-x86_64-standard:4.0”图像上运行。
请帮我找出失败的原因?