【发布时间】:2019-12-09 04:39:14
【问题描述】:
我正在使用 CircleCI 为我的 ASP.NET 项目设置 CI/CD 管道。
CircleCI 已经支持 Window Machine。所以我认为可以将 CircleCI 用于 ASP.NET 项目。
通过CircleCI的documentation,我可以配置.NET Core项目(因为我可以使用命令行来构建和运行.NET Core项目的exe文件)
version: 2.1
orbs:
win: circleci/windows@1.0.0
jobs:
build:
executor:
name: win/vs2019
shell: powershell.exe
steps:
- checkout
- restore_cache:
keys:
- dotnet-packages-v1-{{ checksum "circleci-demo-windows.csproj" }}
- run:
name: "Install project dependencies"
command: dotnet.exe restore
- save_cache:
paths:
- C:\Users\circleci\.nuget\packages
key: dotnet-packages-v1-{{ checksum "circleci-demo-windows.csproj" }}
- run:
name: "Run Build step"
command: dotnet.exe publish -c Release -r win10-x64
- run:
name: "Test the executable"
command: .\bin\Release\netcoreapp2.1\win10-x64\publish\circleci-demo-windows.exe
- store_artifacts:
path: .\bin\Release\netcoreapp2.1\win10-x64\publish\circleci-demo-windows.exe
但是对于 .NET 框架,我似乎无法使用诸如 dotnet.exe publish... 之类的命令。那么如何为 ASP.NET 设置 CircleCi 呢?
对不起,我的问题很幼稚,我四处搜索,但找不到任何有关 CircleCI 和 .net 框架的教程。
【问题讨论】:
标签: asp.net .net continuous-integration circleci