3
votes

I have been building my project using TFS 2010 for months. So far I have not paid any particular attention to whether I was building as Debug or Release.

Now I thought I should build as Release. I assume there is some performance penalty etc. when running an assembly that was built as Debug? I.e. that there is a good reason for building as Release even though by default it seems .pdb's are created in any case these days?

In my build definition I have 8 Projects to Build. When I select Any CPU | Release in "Configurations to Build" in the TFS build definition (Process tab) suddenly only 2 of my 8 projects are copied to drop folder (the build as such successes). Any ideas why?

I'm using Visual Studio 2012, .NET 4.5.

2

2 Answers

2
votes

In the solution in Visual Studio, right click and go to "Configuration Manager...", change the "Active solution configuration" to Release and "Active Solution Platform" to "Any CPU", check that the other projects are set to actually build in this configuration.

0
votes

This also happened to me after a merge. It turns out I had missed an EndProject tag in the sln file, and that got the builder confused. You can easily test for this using the following steps:

  1. Make sure to commit all changes, at least to the sln file
  2. Open the solution in Visual Studio
  3. Open the Configuration Manager whichever way you please (e.g. right click on the solution and select Configuration Manager)
  4. Deactivate something, close the Configuration Manager and save all files
  5. Reopen the Configuration Manager, restore the item you deactivated, and close it again
  6. Save all files again

Now check if Visual Studio has made any changes to the sln files, comparing against what you have in your repository. If there are any changes, your problem is likely fixed. Otherwise, keep hunting!