How to disable search for sln files?

Daniel Wolf's Avatar

Daniel Wolf

27 Apr, 2018 03:55 PM

My build is CMake-based (see attached config file). During the build, CMake generates multiple .sln files and builds them. Everything works fine. But at the end of the build, AppVeyor fails with the message

Specify which project or solution file to use because the folder contains more than one project or solution file.

I understand what causes the error message. AppVeyor found .sln files and expects that I want to build one of them. What AppVeyor doesn't know is that these files have already been built using a different mechanism. I don't want AppVeyor to build these solutions again!

How can I disable this error message?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 27 Apr, 2018 05:36 PM

    Ilya Finkelshteyn's Avatar

    Right, because without any build stage related statement, during this stage in the build pipeline, AppVeyor tries to auto-detect and build .NET solutions or projects.

    You move all or part of the commands from install to build_script stage, or add build: off. If you are unsure of YAML syntax, you can always set the same in UI and then press Export YAML.

  2. 2 Posted by Daniel Wolf on 27 Apr, 2018 06:39 PM

    Daniel Wolf's Avatar

    Thank you for pointing me at build_script. It works now! :-)

    By the way, contrary to your comment and contrary to the official documentation, adding build: off does not seem to be required. As a matter of fact, adding build: off seems to skip the build_script section altogether.

  3. Support Staff 3 Posted by Ilya Finkelshte... on 27 Apr, 2018 06:51 PM

    Ilya Finkelshteyn's Avatar

    I meant to add build: off if you decide to leave all commands under install. Sure build: off takes over build_script :)

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:28 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