Integrate CppDepend with TFS
Integrating CppDepend with Team Foundation Server 2008
First create a CppDepend project (.xml or .cdproj) or use an existing one. It should be in source control so you can reference it for TFS.
Adding a MSBuild target to your solution
- CppDependPath: is the path to the CppDepend console executable (you need a valid Build Machine license on the server)
- CppDependProject: is the path to the CppDepend project
- CppDependOut: is the path were the reports will be generated
Add a post-build task to an existing project, or create a specific msbuild project for CppDepend and add it to the solution to build. The task itself can be either stand-alone:
You can also use the built-in CppDepend MSBuild task:
You can simply add one of these targets to an existing project and add the content of the project element inside the <TargetName="AfterBuild"></Target> element of the project to build.
Accessing the report files
Once TFS has built the build project, the CppDepend report will be inside the Drops folder, under the relevant build version.
Integrating CppDepend with Team Foundation Server 2010
Since the TFS build project format has completely changed between TFS 2008 and TFS 2010, the options are slightly different.
Add the CppDepend target to an existing project
Using the technique outlined above, override the <TargetName="AfterBuild"></Target> in the vcxproj to automatically run CppDepend in TFS.