Parameterizing solution project to build

David Hall's Avatar

David Hall

19 May, 2017 12:50 PM

Hi,

Is it possible in the yaml specification to parameterize the project to build?

In my solution, I have to Azure projects - one for devtest and one for production, that deploy to different cloud services.

Currently appveyor is building both projects (plus the solution it seems) and it would great to be able to build a particular project based on (for example) the branch or an appveyor variable, as is possible for deployment.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 19 May, 2017 01:27 PM

    Ilya Finkelshteyn's Avatar

    Hi David,

    You can use environment variables as path to project file, like this:

    build:
      project: $(project_path)
    
    you can set this project_path variable to be path to specific project depending on conditions you define. Variable name project_path is arbitrary, you can name it as you like. Path can be absolute or relative to main repo folder.

    Ilya.

  2. 2 Posted by David Hall on 19 May, 2017 02:24 PM

    David Hall's Avatar

    Thanks for that.

    I've just tried this and it works perfectly.

    For those interested - I was also able to get it working through the appveyor UI, not needing a yaml file.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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