我需要使用 aws codebuild 构建一个 C# winforms 项目。这是我的buildspec.yml:
version: 0.2
phases:
install:
commands:
- echo "Installing DotNet 4.8"
- Invoke-WebRequest -Uri https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0307177e14752e359fde5423ab583e43/ndp48-devpack-enu.exe -OutFile C:ndp48-devpack-enu.exe
- Start-Process C:ndp48-devpack-enu.exe -ArgumentList "/quiet /norestart /log C:dn48.txt" -wait
- cat C:dn48.txt
- echo "Installing Windows SDK"
- Invoke-WebRequest -Uri https://download.microsoft.com/download/1/c/3/1c3d5161-d9e9-4e4b-9b43-b70fe8be268c/windowssdk/winsdksetup.exe -OutFile C:winsdksetup.exe
- Start-Process C:winsdksetup.exe -ArgumentList "/quiet /norestart /log C:wsdk.txt" -wait
- cat C:wsdk.txt
build:
commands:
- echo "Building application"
- msbuild v14 build....
post_build:
commands:
- echo Build complete
我正在使用 aws codebuild windows-base:2.0。所有安装都通过了,但是当我尝试构建时,Task failed because "AxImp.exe" was not found
尽管我确实安装了Windows 10 SDK
有人知道如何让它工作吗?甚至不必是上述解决方案。
从亚马逊上找到了这个很棒的指南
https://aws.amazon.com/blogs/devops/creating-ci-cd-pipelines-for-asp-net-4-x-with-aws-codepipeline-and-aws-elastic-beanstalk/