I have a solution which contains a project (called Services) which references other projects not included in the solution file. When I build this in Visual Studio, the build fails as expected and I have to go add the projects into the solution. A simple case of references to projects which don't exist.
However, when the same solution is run in CI, we discovered that TeamCity does not report that a project is missing from the solution and instead locates the project from the repository and compiles it anyway. Looking thru verbose log output doesn't say much, but it seems that the TeamCity_Generated_Build target must have some way to know about traversing these dependency references and building them anyway.
Details which may or may not be relevant:
TeamCity wipes it's local repository and pulls a fresh copy of the full repository from Mercurial before every build.
TeamCity then loads our NuGet packages (which pulls all packages for all projects, even those not being built).
- TeamCity then uses the Visual Studio (sln) runner to build the solution.
Currently using TeamCity v8.0.3... but I'd need proof that this is changed in a newer version before I can take upgrading seriously.
I am looking for a way to tell TeamCity to stop building projects not explicitly included in the solution file and instead throw compile errors for missing projects. Does anyone know how TeamCity is accomplishing this? And... is there a way to turn this behavior off in TeamCity that we've somehow managed to turn on?