如何配置Gitlab CI以构建.NET框架应用程序?
.gitlab-ci.yml可能看起来像这样:
image: microsoft/dotnet:latest
stages:
- build
#- test
build_job:
stage: build
script:
- 'echo building...'
- '"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" /p:Configuration=Release /t:Clean;Build ConsoleApp1.sln '发布于 2019-08-29 20:33:32
我还不确定你是想构建标准的.net还是.net核心。如果是后者,我希望这可以为您指明正确的方向。
image: mcr.microsoft.com/dotnet/core/sdk:2.2
stages:
- build
build-job:
stage: build
script:
- dotnet build ConsoleApp1.sln 所有可能的dotnet调用都可以在这里找到:https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet?tabs=netcore21
可以在以下位置找到示例存储库:https://gitlab.com/zanseb/build-dotnet-example
希望这能有所帮助!
https://stackoverflow.com/questions/57676095
复制相似问题