tag:help.appveyor.com,2012-11-13:/discussions/questions/1767-exclude-specific-project-from-buildAppVeyor: Discussion 2018-10-09T21:00:36Ztag:help.appveyor.com,2012-11-13:Comment/382041632015-10-15T11:09:47Z2015-10-15T11:09:48ZExclude specific project from build<div><p>Hi!</p>
<p>Is there a way to exclude one or more projects in a VS solution
from the build process via the appveyor.yml</p>
<p>I have a project for integration tests that I wish to exclude
but I can't find a way how.</p>
<p>Regards<br>
Fred</p></div>Fredtag:help.appveyor.com,2012-11-13:Comment/382041632015-10-15T17:17:50Z2015-10-15T17:17:50ZExclude specific project from build<div><p>Hi Fred,</p>
<p>Open solution configuration in Visual Studio IDE and just
disable selected projects from configurations.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/382041632017-07-13T19:27:24Z2017-07-17T17:50:19ZExclude specific project from build<div><p>I've tried this for a project with a Website project and Appveyor doesn't seem to honor that Configuration. Despite turning off build for all configurations it still will try and build the project.</p></div>Christopher Schoedertag:help.appveyor.com,2012-11-13:Comment/382041632017-07-13T20:09:04Z2017-07-13T20:09:04ZExclude specific project from build<div><p>Please send us the following:</p>
<ul>
<li><code>.sln</code> file</li>
<li>build configuration in YAML format (use <code>Export YAML</code> if you use UI)</li>
<li>link to the build which supposed to not build specific project, but did that.</li>
<li>name of specific project which was built, but should not</li>
</ul>
<p>Please feel free to delete all secrets when needed.</p>
<p>Ilya.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/382041632017-07-17T16:19:06Z2017-07-17T17:50:19ZExclude specific project from build<div><p>Hi Llya,</p>
<p>to whom should I send this to?</p></div>Christopher Schoedertag:help.appveyor.com,2012-11-13:Comment/382041632017-07-17T17:19:23Z2017-07-17T17:19:23ZExclude specific project from build<div><p>You can post them right here in the forum, and make thread private if you are not comfortable for it to be public. Or mail to team at appveyor dot com.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/382041632017-07-17T17:47:32Z2017-07-17T17:47:34ZExclude specific project from build<div><p>Hi Llya,</p>
<p>I've resolved this through discovering that I was targeting 'Mixed Platforms' when handling the build configuration. Instead I need to look at the 'Any CPU' build configuration and turned it off there. Once I did this issue was resolved.</p></div>Christopher Schoedertag:help.appveyor.com,2012-11-13:Comment/382041632017-07-17T17:58:02Z2017-07-17T17:58:12ZExclude specific project from build<div><p>Thank you for update!</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/382041632018-08-07T12:46:03Z2018-08-07T12:46:04ZExclude specific project from build<div><p>Hi there, thanks for an interresting conversation.<br>
Still, I think this is a question that deserves an answer. (If there is a simple one, like some script where I just put the file or something...)</p>
<p>Right now, I am trying to figure out how to exclude file "ConnectionStrings.config", that is obviously not uploaded on Github, but I have references in my Web.config file to it:</p>
<p>so the build is being killed by error Could not copy the file "blablabla\ConnectionStrings.config" because it was not found.</p>
<p>Any idea?</p></div>Linda tag:help.appveyor.com,2012-11-13:Comment/382041632018-08-07T18:06:58Z2018-08-07T18:06:58ZExclude specific project from build<div><p>Trivially speaking, you could add<br></p>
<pre>
<code> <ItemGroup>
<Content Update="ConnectionStrings.config">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup></code>
</pre>
to your project file.
<p>But without knowing anything about your specific build/deployment, I'd suggest that you may want to read through the section in our docs about <a href="https://www.appveyor.com/docs/deployment/web-deploy/#web-deploy-parametrization">web deploy parameterization</a></p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/382041632018-08-08T14:05:40Z2018-08-08T14:05:41ZExclude specific project from build<div><p>Thanks for your answer.</p>
<p>I was reading about parametrization, but that's not my case.<br>
I am injecting connection string right via Azure, everything is working (my deployment problem was solved by deleting azure service and creating it again -.- :D) but I am hacking a bit the build in appVeyor - I am creating an empty file "ConnectionStrings.config" jut to tell AppVeyor that it's all right, the file exists:<br>
(line in my appveyor.yml)</p>
<p>before_build:<br>
- ps: New-Item C:\blablabla\ConnectionStrings.config -type file</p>
<p>It's not a big problem, but I was looking for more elegant solution :)</p></div>Linda tag:help.appveyor.com,2012-11-13:Comment/382041632018-08-08T23:28:40Z2018-08-08T23:28:40ZExclude specific project from build<div><p>I could be wrong but I think you might not really need this <em>connectionStrings.config</em> file at all.<br>
I believe if you just add something like<br></p>
<pre>
<code><connectionStrings>
<add name="<my_connection_string>" connectionString="Dummy value to be overridden"/>
</connectionStrings></code>
</pre>
to your <em>web.config</em> file and make the name match the key-value pair you set up in Azure, then you can inject the connection string that way.</div>Owen McDonnell