tag:help.appveyor.com,2012-11-13:/discussions/problems/7200-specify-which-project-or-solution-file-to-use-because-the-folder-contains-more-than-one-project-or-solution-fileAppVeyor: Discussion 2018-10-19T08:18:26Ztag:help.appveyor.com,2012-11-13:Comment/431126032017-07-31T21:57:19Z2017-07-31T21:57:50ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>As long as you set configuration to be fetched from remote YAML file, AppVeyor respects it, regardless what can be found in cloned repository.</p>
<p>However, from what I understood, that project contains nested solutions. Is it true? Other words, does "main" project contains something like this in <code>.csproj</code>?<br></p>
<pre>
<code><?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProjectToBuild Include="First.sln" />
<ProjectToBuild Include="Second.sln" />
</ItemGroup>
<Target Name="Build">
<MSBuild Projects="@(ProjectToBuild)"/>
</Target>
</Project></code>
</pre>
And if yes:
<ul>
<li>do you need anything except build, like WAP or nuget packaging?</li>
<li>does it builds locally with <code>msbuild</code>?</li>
</ul>
<p>Ilya.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431126032017-07-31T22:11:54Z2017-07-31T22:11:55ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><blockquote>
<p>As long as you set configuration to be fetched from remote YAML file, AppVeyor respects it, regardless what can be found in cloned repository. But remote yaml does not contains option<br></p>
<pre>
<code>build:
project:</code>
</pre>
however, from what I understood, that project contains nested solutions. Is it true? Yes
<p>Other words, does "main" project contains something like this No, my project is MSBuild task developing. So my unit test library contains some tests which have real VS project as data source.</p>
<p>do you need anything except build, like WAP or nuget packaging? Yes but it is complex question :)</p>
<p>does it builds locally with msbuild? Of course. Even furthermore this project successfully builded before i tried to use "generic" remote yaml.</p>
</blockquote>
<p>So main question: Is it possible to use "generic" remote yaml configs in different projects which have several solutions? (If project has single solution everything works as expected)</p></div>BlackGadtag:help.appveyor.com,2012-11-13:Comment/431126032017-07-31T22:13:02Z2017-07-31T22:13:05ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>oh i screw up message formatting, sry for that</p></div>BlackGadtag:help.appveyor.com,2012-11-13:Comment/431126032017-07-31T22:19:22Z2017-07-31T22:19:23ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>All references, maybe could help you:</p>
<p><a href="https://github.com/BlackGad/PS.Build/tree/ci">https://github.com/BlackGad/PS.Build/tree/ci</a> github repository<br>
<a href="https://ci.appveyor.com/project/BlackGad/ps-build-xhs18">https://ci.appveyor.com/project/BlackGad/ps-build-xhs18</a> project url<br>
<a href="https://github.com/BlackGad/PS.Appveyor/blob/master/ci.appveyor.yml">https://github.com/BlackGad/PS.Appveyor/blob/master/ci.appveyor.yml</a> configuration (raw link in project)</p></div>BlackGadtag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T02:25:45Z2017-08-01T02:25:45ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>I see. AppVeyor fails because it does recursive search in the project folder and found more than one <code>.sln</code> file. Do you need to build solutions like <a href="https://github.com/BlackGad/PS.Build/blob/ci/PS.Build.Tasks.Tests/TestReferences/Projects/DynamicVaultProject/Solution.sln">this</a> or they just used somehow during test execution? At least I do not see any references to those solutions in any <code>.csproj</code>.<br>
If answer is NO, so you do not want to build those solutions, then you can simple set the following:<br></p>
<pre>
<code>build:
project: PS.Build.sln</code>
</pre>
<p>If you need to build those solutions, then you probably need to do it as <code>before_build</code> or <code>after_build</code> script.</p>
<p>If this is not what you need, let me repeat my question: how you build this locally?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T07:00:39Z2017-08-01T07:00:40ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><blockquote>
<p>AppVeyor fails because it does recursive search in the project folder and found more than one <code>.sln</code> file</p>
</blockquote>
<p>Is there option to disable recursive scan? or setup search pattern at least? <code>**\*.sln</code> for example</p>
<blockquote>
<p>Do you need to build solutions like this or they just used somehow during test execution?</p>
</blockquote>
<p>Nope tests will manage to build them. I do not expect that appveyor build it by itself.</p>
<p>Ok will try to explain my general setup:</p>
<p>I have several (more than 2) solutions in different repositories. And i have 1 yaml configuration file. Thats why i do not want to specify option in generic yaml file<br></p>
<pre>
<code>build:
project: some.sln</code>
</pre>
Now lets return to start questions: Does appveyor override this option with local value ? (suppose no). What you can purpose for solution in current situation?
<p>Fast workarounds are two:<br>
1. Rename test solution extensions (not quite comfortable way)<br>
2. Rename main solution in all projects to <code>solution.sln</code> and specify remote option<br></p>
<pre>
<code>build:
project: solution.sln</code>
</pre>
<p>But workarounds is not best practice :) So I am still hoping that you have more elegant solution :)</p></div>BlackGad tag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T10:58:20Z2017-08-01T10:58:21ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>Used workaround 2. But hope you will improve this functionality somehow in future :) Search pattern for example)</p></div>BlackGad tag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T16:08:59Z2017-08-01T16:08:59ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>Maybe what you can do is to use some environment variable like:</p>
<pre>
<code>build:
project: $(project_name)</code>
</pre>
<p>and set this environment variable value differently for different projects in UI (<code>Settings > Environment</code>). Environment variables are one of few things which are being merged with those in YAML. So you will still have one-YAML-fits-all, but different values of <code>project_name</code> variable for different projects in UI.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T18:12:52Z2017-08-01T18:12:54ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>exactly what I needed! It is elegant solution</p></div>BlackGadtag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T18:21:34Z2017-08-01T18:21:34ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>Good :)</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431126032017-08-01T18:21:55Z2017-08-01T18:21:56ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>was confused by this <a href="http://help.appveyor.com/discussions/problems/1446-yml-file-isnt-finding-my-solution-file">http://help.appveyor.com/discussions/problems/1446-yml-file-isnt-fi...</a></p>
<p>And missed last message)</p>
<blockquote>
<p>Sweet - Issue <a href="http://help.appveyor.com/discussions/problems/1446/r?go=aHR0cHM6Ly9naXRodWIuY29tL2FwcHZleW9yL2NpL2lzc3Vlcy8xMzE=">added</a>.</p>
</blockquote></div>BlackGadtag:help.appveyor.com,2012-11-13:Comment/431126032018-04-13T04:04:59Z2018-04-13T04:04:59ZSpecify which project or solution file to use because the folder contains more than one project or solution file.<div><p>I have an problem about build repository. With no changed 2 files of appveyor.yml and HipHop.sln<br>
1Build started<br>
2git clone -q --branch=dev <a href="mailto:git@github.com">git@github.com</a>:SE-REM/HipHop.git C:\projects\hiphop<br>
3git checkout -qf 4ce8014ca8214913e0f7832a81df6c5ef325819c<br>
4Specify which project or solution file to use because the folder contains more than one project or solution file.</p>
<pre>
<code> I have checked repository of “SE-REM/HipHop.git”, there was no more than one *.sln file.
An I used the cmd of msbuild in the file of appveyor.yml in my local machine. That’s ok, no error.
msbuild "%APPVEYOR_BUILD_FOLDER%\src\HipHop.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=Release;DebugType=full /p:DeployOnBuild=True /p:ExcludeGeneratedDebugSymbol=False /p:AutoParameterizationWebConfigConnectionStrings=False
please please please help. What’s the problem of this.</code>
</pre></div>Anthony Xu