Search code examples
buildtfsbuild-processvisual-studio-2013ndepend

How can I get NDepend to run as part of my build process?


I love NDepend and would love it even more if I could figure out how to get it to run a report overnight as part of our build process.

We're using NDepend v5 and TFS 2012 and I can't for the life of me find any resources on how to do this. The closest I've found all reference 2010 and are very short of detail.

These are the resources I've been going by:

My ideal here would be a build process that runs NDepend over the latest version of the solution every night at midnight and emails the HTML report around the office. I've spent a couple of hours trying to figure out how to get this working within the build process template and have pretty much given up. At this point I feel like it might just be easier to manually run it every morning.

Has anyone got this working with TFS 2012?

EDIT: It's all a bit too complicated I think, and we've got work to be getting on with, so I used Patrick's link and just run NDepend from the command line via a task scheduler. It would be nice to have some proper build integration but I don't have time to muck around for a few days on this.


Solution

  • ...and to follow up a bit on timB33 answer, here is the NDepend.Console.exe command line argument doc, that you'll invoke from your build process.

    Also, you can achieve much more subtil scenarios by coding a TFS build extension invoking NDepend.API. See our getting started with NDepend.API page.

    We hope to make TFS and other CI systems integration available out-of-the-box in future versions, you can vote on our User Voice page.