GitHub动作:无法找到输入文件

实用的索尼

我在这里尝试为我的解决方案还原nuget软件包。为此,我在GitHub上编写了以下代码:

name: CI

on:
  push:
  pull_request:
      branches:
      - '*'
env:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'
jobs:
  ci_build:
    name: Build
    runs-on: windows-latest
    steps:
    - name: NPM Authentication
      uses: actions/checkout@v1
    - name: Use Node.js
      uses: actions/setup-node@v1
    - name: Nuget Command
      uses: actions/checkout@master
    - uses: nuget/setup-nuget@v1
      with:
        nuget-api-key: ${{ secrets.NuGetAPIKey }}
    - run: nuget restore MyProject.sln
    - name: NuGet Tool Installer
      run: NuGetToolInstaller@0
    - name: NuGet Commad
      run: NuGetCommand@2
      env:
        restoreSolution: '$(solution)'
        selectOrConfig: 'config'
        nugetConfigPath: 'Build/NuGet.config'
    - name: VS Build
      run: VSBuild@1
      env:
        solution: '$(solution)'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
        msbuildArgs: /p:AuthenticateWithRegistry=false
    - name: VS Test
      run: VSTest@2
      env:
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
        testSelector: 'testAssemblies'
        testAssemblyVer2: '**\*test*.dll!**\*IntegrationTests.dll!**\*UiTests.dll!**\*TestAdapter.dll!**\obj\**'
    - name: Copy Files to - $(build.artifactstagingdirectory)
      run: CopyFiles@2
      env:
        content: |
            **\bin\Project*.zip
            **\bin\**\$(buildConfiguration)\*.msi
        targetFolder: $(build.artifactstagingdirectory)
        flattenFolders: true

下面是我得到的错误:

Run nuget restore Advanced.OpenLink365.sln

nuget restore MyProject.sln

shell: C:\Program Files\PowerShell\6\pwsh.EXE -command ". '{0}'"

env:

solution: **/*.sln

buildPlatform: Any CPU

buildConfiguration: Release

NUGET: C:\hostedtoolcache\windows\nuget.exe\5.4.0\x64/nuget.exe

Input file does not exist: MyProject.sln.

##[error]Process completed with exit code 1.

此外,我发现在“ C:\ Program Files \ Powershell \ 6 \ pwsh.EXE”和C:\ hostedtoolcache \ windows \ nuget.exe \ 5.4.0 \ x64 / nuget.exe中没有可用的文件

另外,FYR-文件夹结构如下:

  • 项目回购
    • .github
      • 工作流程
      • CI语言
    • 专案
      • MyProject.sln
      • ...其他项目文件

请让我知道我在这里错过了什么。

谢谢

smac89

将命令更改为:

- run: nuget restore Projects/MyProject.sln

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章