【发布时间】:2019-06-17 13:33:36
【问题描述】:
我正在尝试在 AWS Lambda 中运行 .Net Core 应用程序,并且我正在努力通过 Azure Pipelines 进行持续部署。
我使用适用于 Visual Studio 的 AWS 工具创建了一个空的 .Net Core lambda 项目,并在 azure devops 中使用推荐的“.net desktop”构建管道设置了构建。 yaml代码可以看这里:
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
- master
pool:
vmImage: 'VS2017-Win2016'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
(我已经删除了 mstest 任务,因为我的项目不包含任何单元测试)
此管道已成功构建。
然后我运行一个发布管道,使用前一个管道中的构建并设置为在每个新构建上进行部署。发布管道包含使用我的 AWS lambda 帐户设置的“AWS Lambda .NET Core 部署”任务。我选择链接的 artifacts/_lambdatest (build) 文件夹(其中 lambdatest 是我的项目的名称),部署时,发布会收到错误消息:
2019-01-23T21:33:45.1791634Z ##[error]Unhandled: Not found lambdaProjectPath: D:\a\r1\a\_lambdatest
我可以做些什么来尝试让它工作?我认为问题出在“通往 lambda 项目的路径”所指的位置,但我不知道该项目可能在哪里?
【问题讨论】:
标签: amazon-web-services azure .net-core azure-devops azure-pipelines-release-pipeline