Home > Software engineering >  Actions dont copy the entire subfolder
Actions dont copy the entire subfolder

Time:05-04

I was trying to build my soultion using msbuild and using follow ing workflow


on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  # Path to the solution file relative to the root of the project.
  SOLUTION_FILE_PATH: ./genshincheat.sln

  # Configuration type to build.
  # You can convert this to a build matrix if you need coverage of multiple configuration types.
  # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  BUILD_CONFIGURATION: Release

permissions:
  contents: read

jobs:
  build:
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - uses: actions/setup-dotnet@v1
      - name: Build
        run: dotnet build
      - name: Run tests
        run: dotnet test

The problem comes when the msbuild command runs :-

Build FAILED.

D:\a\genshin-cheat\genshin-cheat\injector\injector.vcxproj : warning NU1503: Skipping restore for project 'D:\a\genshin-cheat\genshin-cheat\injector\injector.vcxproj'. The project file may be invalid or missing targets required for restore. [D:\a\genshin-cheat\genshin-cheat\genshincheat.sln]
D:\a\genshin-cheat\genshin-cheat\cheat-base\cheat-base.vcxproj : warning NU1503: Skipping restore for project 'D:\a\genshin-cheat\genshin-cheat\cheat-base\cheat-base.vcxproj'. The project file may be invalid or missing targets required for restore. [D:\a\genshin-cheat\genshin-cheat\genshincheat.sln]
D:\a\genshin-cheat\genshin-cheat\cheat-library\cheat-library.vcxproj : warning NU1503: Skipping restore for project 'D:\a\genshin-cheat\genshin-cheat\cheat-library\cheat-library.vcxproj'. The project file may be invalid or missing targets required for restore. [D:\a\genshin-cheat\genshin-cheat\genshincheat.sln]
C:\Program Files\dotnet\sdk\6.0.202\NuGet.targets(130,5): warning : Unable to find a project to restore! [D:\a\genshin-cheat\genshin-cheat\genshincheat.sln]
D:\a\genshin-cheat\genshin-cheat\cheat-base\cheat-base.vcxproj(25,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
D:\a\genshin-cheat\genshin-cheat\cheat-library\cheat-library.vcxproj(757,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
D:\a\genshin-cheat\genshin-cheat\injector\injector.vcxproj(39,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
    4 Warning(s)
    3 Error(s)

Time Elapsed 00:00:12.01
Error: Process completed with exit code 1.

I suppose this is because of the non - existence of the file mentioned my repo has a solution file and with it 3 subfolders. in the error "cheat-base\cheat-base.vcxproj(25,3)" was missing so i suppose one of the subfolders i.e. cheat-base isnt being cloned. any solutions?

CodePudding user response:

adding recursive instead of true to subfolder solved this

  • Related