【问题标题】:Could not find the required *.deps.json for .NET Core AWS Serverless Application找不到 .NET Core AWS 无服务器应用程序所需的 *.deps.json
【发布时间】:2020-09-04 03:22:55
【问题描述】:
  • 基于模板“AWS Serverless Application (.NET Core - C#)”创建新的 Visual Studio 解决方案
  • 搭建一个 ASP.NET Core Web API
  • 在项目文件夹中运行sam local start-api -t serverless.template
  • http://localhost:3000/api/values 发出 GET 请求
  • 导致错误:

    无效的 API 网关响应键:{'errorType'中的 {'errorMessage', 'errorType'}: 'LambdaException', 'errorMessage': "找不到所需的 'AWSServerless1.deps.json'。该文件应该是位于部署包的根目录。"}

我没有对从 Visual Studio 模板创建的解决方案进行任何更改。

【问题讨论】:

    标签: .net-core aws-sam


    【解决方案1】:

    通过更新 serverless.template 以包含:

    "CodeUri": "bin/Release/netcoreapp3.1"

    然后:dotnet publish -c Release 在运行 sam local start-api -t serverless.template 命令之前。

    【讨论】:

      猜你喜欢
      • 2019-05-28
      • 2019-02-18
      • 2020-10-12
      • 2021-05-30
      • 1970-01-01
      • 2021-06-14
      • 1970-01-01
      • 2018-11-20
      • 2020-04-18
      相关资源
      最近更新 更多