Target multiple solution files

jziaja's Avatar


06 Jan, 2015 07:40 PM

Is it possible to build multiple solution files contained in a single GitHub repo? In my repo, I have separate solutions that target different versions of the .NET framework. Is there a way I can specify in my appveyor.yml file that I'd like to build each of these solutions? Thanks!

  1. Support Staff 1 Posted by Feodor Fitsner on 06 Jan, 2015 07:46 PM

    Feodor Fitsner's Avatar


    There are at least two ways of doing that:

    1) Create a new AppVeyor project for every solution. All these projects will be cloning from the same repo but building different solutions.

    2) Use your own build script (commands) and call msbuild for every solution from there.

  2. 2 Posted by jziaja on 06 Jan, 2015 07:52 PM

    jziaja's Avatar

    Thanks for the quick feedback! :)

  3. 3 Posted by jziaja on 07 Jan, 2015 05:57 PM

    jziaja's Avatar

    In an attempt to keep the CI build process simple for my project (and by simple, I mean having just one build process), I started by implementing Option #2 (using custom build script commands in my appveyor.yml file). This worked great for building the project; however, when running the unit tests for each solution it required that each built unit test assembly have a different name. Also, the build output doesn't make it clear when running unit tests what assembly the unit test is being run from. It looks like the unit test runner is first discovering the tests from all the assemblies and then running all of them in one go. Is there any way to run all tests from each assembly one assembly at a time?

    Also, between Option #1 and #2, are either of those recommended or preferred among other users? While I did get Option #2 working, I'm considering going with Option #1 (separate AppVeyor projects for each solution) as it provides more clarity into the status of each solution.

  4. Support Staff 4 Posted by Feodor Fitsner on 07 Jan, 2015 06:41 PM

    Feodor Fitsner's Avatar

    ...or you can try using build matrix to have a multi-job build for various configurations/platforms.

    UPDATE: You can use environment variable groups to specify build job details. Let me know what's the structure of your solution and I'd be able to advise something.

  5. 5 Posted by jziaja on 07 Jan, 2015 06:49 PM

    jziaja's Avatar

    The configuration/platforms are identical between each solution. It's just the target .NET framework that differs. Build matrix doesn't seem to address this, unless I'm missing something.

  6. Support Staff 6 Posted by Feodor Fitsner on 07 Jan, 2015 06:56 PM

    Feodor Fitsner's Avatar

    You can put solution name into environment variables and then use the same build script. See attached screenshot.

    Or in appveyor.yml:

      - solution_name: solution1.sln
      - solution_name: solution2.sln

    Then you can have:

      - msbuild %solution_name%
  7. 7 Posted by jziaja on 07 Jan, 2015 06:59 PM

    jziaja's Avatar

    I guess it would help if I provided context for the project. :) I'm trying to get this setup for the PayPal .NET SDK. The SDK builds assemblies targeting the .NET 4.0, 4.5, and 4.5.1 frameworks. Currently, each solution builds with the same files and same unit tests, but that is going to change soon as I add more Async support to the 4.5.1 build and accompanying unit/functional tests.

    I'd like to use AppVeyor to build the following solutions:
    * PayPal.SDK.NET40.sln * PayPal.SDK.NET45.sln * PayPal.SDK.NET451.sln

    Each solution currently builds both the SDK and accompanying unit tests for its specific framework. If I try to have one AppVeyor project that builds everything, I'd need to update each unit test project to build with a different name so all tests get loaded correctly. Alternatively, I'm considering having separate AppVeyor projects for each solution; however, I'm not sure if that would add any maintenance burden for my team in keeping up with all three AppVeyor projects.

  8. 8 Posted by jziaja on 07 Jan, 2015 07:02 PM

    jziaja's Avatar

    Thanks for the clarification, Feodor! I'll give the build matrix a try then. :)

  9. Support Staff 9 Posted by Feodor Fitsner on 07 Jan, 2015 07:13 PM

    Feodor Fitsner's Avatar

    Oh, nice, the project is open source :) Will play with it as well.


  10. 10 Posted by jziaja on 07 Jan, 2015 08:38 PM

    jziaja's Avatar

    I created a ci-support branch where I'm testing out the build matrix solution. Really loving how each solution & configuration is listed as a separate job in the LATEST BUILD project view. This is exactly what I was looking for. :)

  11. Support Staff 11 Posted by Feodor Fitsner on 07 Jan, 2015 08:50 PM

    Feodor Fitsner's Avatar

    Yeah, looks nice.

    I've noticed you are running on a free plan. Would you like to test it on Pro to feel the difference (2-3x times faster builds and almost instant build start)?

  12. 12 Posted by jziaja on 07 Jan, 2015 09:38 PM

    jziaja's Avatar

    I appreciate the offer, but for now we're going to stick with the free plan as the build times are sufficient and it's not overly imperative (yet) that builds get kicked off instantly. If that does change, I'll definitely let you know. :)

    Thanks again for all your help!

    • Jason
  13. Support Staff 13 Posted by Feodor Fitsner on 07 Jan, 2015 09:51 PM

    Feodor Fitsner's Avatar


  14. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:53 AM.

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

Keyboard shortcuts


? 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