在Github中,工作流持续集成如何在代码推送中在Github中构建asp.net 4.5?

时间:2019-10-11 13:26:28

标签: asp.net github build workflow github-actions

我已经在github的Actions选项卡上创建了一个构建工作流,它将通过代码推送来构建项目。我已经创建了像这样的build.yml文件

name: CI
on: [push]
jobs:
  build:
    runs-on: windows-latest
    name: Build

    steps:
    - uses: actions/checkout@v1
    - name: Run a one-line script
      run: Run dotnet MyProjectName
    - name: Run a multi-line script
      run: |
        echo Add other actions to build,
        echo test, and deploy your project.```


But its .net framework 4.5 project so this command is for .net core. 
Is there any other command for building the application on Github server.

1 个答案:

答案 0 :(得分:1)

Windows-latest已经安装了所有构建工具。您可以直接使用msbuild代替dotnet core。这是在Windows最新版本和其他受支持的操作系统上安装的所有工具的参考

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners#windows-server-2019