As part of a solution I was including the 3rd Party “MVCForum” projects which I didn’t want to build on every commit. I need to exclude this projects from building in TeamCity. Steps below…
Easiest way to do this is through Visual Studio …Build…Configuration Manager….New (I called mine “TeamCity”). Untick the projects you don’t want to include as part of the build. Ensure “Mixed Platforms” is also selected if that’s your intent.
In TeamCity, (Build Configuration….Parameters….System Properties…) and add system.Configuration
with Value of the solution config introduced in point 1 (mine being TeamCity).
Don’t do what I first did and specify /p:Configuration=”MyConfig” in the Build Step as TeamCity whines about using a system param.
There are no “Command Line Parameters” required here. That box should be blank. The beauty of setting up a System Parameter means it will be injected automatically by TeamCity at build time.
Finally, if you have a Unit Test step(s) and you should have! then you’ll need to change the bin folder of your unit test assemblies to include your Build config name.