Team Foundation Server is a pretty sweet setup. It integrates source control into the Visual Studio IDE, and makes it easy for teams to work on projects together. With a little tweaking you can set up Continuous Integration and nightly builds. There are many different ways to set up your project layouts and references, which can make it easier to do deployments, etc. The one thing they forgot to mention is that, it is really easy with .NET projects. It gets a little hairy with Visual C++ projects.
What happens is that if you have VC++ projects that output libs (assemblies in .NET Land), and another project needs to reference them, you will probably run into pathing issues on your TFS buildserver.
TFS wants to output all the binaries to a specific folder. With VC++, there is a TFSBuild.props file that gets created dynamically that overrides the output folder (nice huh?). It is really a pain to try to override this yourself from what I have been researching. 20 different ways and no real solid method.
On your TFS server, in the path
C:Program FilesMSBuildMicrosoftVisualStudiov8.0TeamBuildMicrosoft.TeamFoundation.Build.targets
Is where all the settings are stored for how the builds happen.
There is a place in there where you can find the setting where the path gets overridden for VC++. It is set as $(OutDir)
When you make projects on your local machine, the output dir is set to $(SolutionDir)$(ConfigurationName)
Everything builds fine on your local machine, but once you try to set up a team build and have it build on the TFS server, it croaks, because the paths to libs arent the same.
Even though Microsoft says all over, never edit the .targets file, I did anyways, and all our projects build and have no issues on the TFS Server.
One other quick thing I have found different for VC++ projects compared to .NET projects. When you create a team build, you need to specify Win32 for the CPU target instead of the default Any CPU. Another quirk as usual 🙂






