Multiple solutions in a repository

Abhishek's Avatar

Abhishek

31 Jul, 2015 10:32 PM

Hi,

Need some help in configuring jobs within a build for multiple solution files. One of the solution is a different path than other. Here is the current configuration. I would like to add a solution which is located within a folder like Shared/Foldername/somesolution.sln

-
  branches:
    only:
      - master

  version: 0.0.{build}
  configuration: Release
  matrix:
    fast_finish: true
  environment:
    SolutionDir: $(APPVEYOR_BUILD_FOLDER)\
    matrix:
      - project_name: Project1
      - project_name: Project2
      - project_name: Project3
      - project_name: Project4
  install:
  - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
  cache:
  - packages -> **\packages.config
  assembly_info:
    patch: true
    file: '**\AssemblyInfo.*'
    assembly_version: '{version}'
    assembly_file_version: '{version}'
    assembly_informational_version: '{version}'
  before_build:
  - echo %project_name%
  - cd src/%project_name%
  - nuget restore -verbosity detailed
  - cd ../..
  build:
    verbosity: normal
project: src/$(project_name)/XXXX.YYY.$(project_name).sln
  notifications:
  - provider: Slack
    auth_token:
      secure: EZWdaqX0e10puQpOEY5NmkxJp28DBwIjNn5JcDxyappuw1189+12Qfyixq/5SLHz
    channel: tech
    on_build_success: true
    on_build_failure: true
    on_build_status_changed: false

Thanks !

  1. Support Staff 1 Posted by Feodor Fitsner on 31 Jul, 2015 10:44 PM

    Feodor Fitsner's Avatar

    If you want defining the entire thing declaratively then I'd put full path to project_name, like:

        matrix: 
          - project_name: src/Project1/XXXX.YYY.Project1.sln 
          - project_name: src/Project2/XXXX.YYY.Project2.sln 
          - project_name: src/Project3/XXXX.YYY.Project3.sln 
          - project_name: src/Project4/XXXX.YYY.Project4.sln 
          - project_name: Shared/Foldername/somesolution.sln
    

    and then

      build: 
        verbosity: normal 
        project: $(project_name)
        ...
    
  2. 2 Posted by Abhishek on 31 Jul, 2015 10:56 PM

    Abhishek's Avatar

    Thanks, somehow this now give me error paring .yml, please contact support.

    https://ci.appveyor.com/project/RealROI/cis-v2

  3. Support Staff 3 Posted by Feodor Fitsner on 31 Jul, 2015 10:58 PM

    Feodor Fitsner's Avatar

    I can't see private project without being added as collaborator (https://ci.appveyor.com/team).

    You can verify YAML using this tool: https://ci.appveyor.com/tools/validate-yaml

  4. 4 Posted by Abhishek on 31 Jul, 2015 11:04 PM

    Abhishek's Avatar

    Thanks again!.. I had tabs in my file and did not know you can't have them.

    This is what is causing issue now -
      before_build:
      - echo %project_name%
      - cd src/%project_name%
      - nuget restore -verbosity detailed
      - cd ../..

    since project_name is now full path, not sure how to run nuget restore. Is this required?

  5. Support Staff 5 Posted by Feodor Fitsner on 31 Jul, 2015 11:08 PM

    Feodor Fitsner's Avatar

    You don't necessary need to cd into each folder. Just do:

      before_build: 
      - echo %project_name% 
      - nuget restore %project_name% -verbosity detailed
    

    or src/%project_name% - don't know all the details...

  6. 6 Posted by Abhishek on 31 Jul, 2015 11:13 PM

    Abhishek's Avatar

    This worked great. Awesome! Thank you very much for your prompt support. Highly appreciate it!

  7. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:58 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac