Jan
28
2010

NDepend v3 - now 100% integrated in Visual Studio

Patrick just announced on his blog the launch of the new NDepend v3. It is still in beta but very stable. I am testing it for a month now and enjoy very much it’s integration in Visual Studio 2008. I was using it and will continue to use it in our continuous integration server, TeamCity. But getting feedback right out of the developer environment is a very interesting feature.

Read more on Patrick’s blog post, “NDepend v3 is now 100% integrated in Visual Studio

Even on large code base, made of hundreds of thousands of lines of code and dozens of VS projects, Visual Studio is not noticeably slow down by the NDepend v3 addin.

VisualStudio 2010, 2008 and 2005

Simply put, what NDepend v2 does in the Continuous Integration/Build process, NDepend v3 does it live at development-time inside Visual Studio

Multi VS solutions wide-analysis and collaboration

Rich Code Search in VS

Multi CQL Query Edition in VS

Code visualization in VS

Continuous comparison with a base line in VS

Reflector disassembly’s comparison

Deep VS Integration

NDepend Session state preserved

ProgressCircleTooltip[1]

Well done Patrick!

May
16
2008

Bringing Linq to Euss ORM

Euss stand for Evaluant Universal Storage Services, it's a great open source (MIT License) Object-Relational mapping framework.

I use Euss on Tech Head Brothers portal since a long time now.

Four days ago I went to Sébastien Ros, the architect of Euss, with a first draft implementation of IQueryable<T> for Euss. Almost everything was already implemented but it was missing the IQueryable<T>. Today Sébastien came back to me with a first implementation that I could quickly integrate.

As you can see on the following screenshots, made with NDepend, I was then able to remove the dependency on Euss from my Service Layer.

Before with dependency from TechHeadBrothers.Portal.Services to Evaluant.Uss

 

After without dependency from TechHeadBrothers.Portal.Services to Evaluant.Uss

Great new step!

Apr
25
2008

Using NDepend in Team City build management tool

In my effort to bring a good development environment for the next version of Tech Head Brothers portal, in which we should be (at the moment) three to develop, I went on with the integration of NDepend, the wonderful tool of Patrick Smacchia, with the just as well JetBrains Team City build management server.

As said in my last post I have defined three builds type

  1. Continuous Integration - running compilation, unit testing, code coverage and deployment on staging
  2. Nightly build - to find duplicates in the code
  3. Nightly build - running compilation, unit testing, code coverage and code analyze

NDepend is integrated in the 3rd point during this nightly build for the code analyze.

My solution in Visual Studio is organized as the following:

In which you can see

  1. a Visual Studio 2008 Web Deployment Projects which I customized to carry out the different build tasks for the 3 different built types (Continuous Integration, Nightly duplicates and Nightly full analyze): TechHeadBrothers.Portal.csproj_deploy, this is just a MSBuild script
  2. The configuration file for NDepend: TechHeadBrothers.Portal.xml

The next thing I used is to define new configuration:

Nightly and Staging configuration are new one based on the Debug configuration. This will help me to control my MSBuild script with the two build types I am interested about: Continuous Integration = Staging, Nightly = Nightly (obvious ;).

Let's take a look at the MSBuild script with the new "Open Project File" menu in Visual Studio 2008:

First I am importing the MSBuild tasks exposed by NDepend like this:

  <UsingTask AssemblyFile="$(NDependPath)\MSBuild\NDepend.Build.MSBuild.dll" TaskName="NDependTask" />

Then defining some properties that will ease the build script writting later on:

    <!-- NDepend -->
    <NDependPath>C:\Program Files\_Tools\Development\ndepend</NDependPath>
    <NDependProjectFilePath>$(TestsFolder)\NDepend\TechHeadBrothers.Portal.xml</NDependProjectFilePath>
    <NDependInDirs>"$(SolutionFolder)\Sources\TechHeadBrothers.Portal\bin";"C:\Windows\Microsoft.NET\Framework\v2.0.50727";</NDependInDirs>
    <NDpendOutputDir>$(TestsFolder)\Output\NDependOut</NDpendOutputDir>
  </PropertyGroup>

Then I define a Target for NDepend:

  <Target Name="NDepend">
    <Message Text="#--------- Executing NDepend ---------#" />
    <NDependTask NDependConsoleExePath="$(NDependPath)" 
                 ProjectFilePath="$(NDependProjectFilePath)" 
                 InDirsDotComaSeparated="$(NDependInDirs)" 
                 OutDir="$(NDpendOutputDir)" />
  </Target>

Then in the after build target I call the NDepend target if the configuration is the Nightly one:

  <Target Name="AfterBuild">
    <CallTarget Condition=" '$(Configuration)' == 'Staging' " Targets="SummaryCoverage" ContinueOnError="false" />
    <CallTarget Condition=" '$(Configuration)' == 'Nightly' " Targets="FullCoverage" ContinueOnError="false" />
    <CallTarget Condition=" '$(Configuration)' == 'Nightly' " 
                Targets="NDepend" 
                ContinueOnError="false" />

Now what we want to have is the possibility to see the report generated by NDepend on the Team City portal like this:

To achieve this like for NCover (Integration of NCover into Team City for Tech Head Brothers) we have to configure Team City to deal with the artifacts that NDepend creates, so in the settings of your build you need to define the following:

  

Then you need to edit on the build server the file main-config.xml and add the following configuration:

<report-tab title="Code Coverage Summary" basePath="" startPage="CoverageSummary.html" />
<report-tab title="Code Coverage" basePath="Coverage" startPage="index.html" />
<report-tab title="NDepend" basePath="NDepend" startPage="NDependReport.html" />

Beware not to have two title with the same value!

You will get access also to all created artifacts through the artifacts tab of Team City:

Remark: It would be really nice to be able to have a RSS Feed that would expose the artifacts created! I hope to see this feature in a next release of Team City!

Happy build management!

Apr
9
2008

Team City 3.1 and NDepend 2.8 integration

I finally managed to integrate those two wonderful tools Team City and NDepend as you can see on the following picture:

I will post soon the way I use to integrate those two, as I did for NCover.

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent is awarded by Microsoft since Avril 2002: Most Valuable Professional (MVP).

MVP
Certified ScrumMaster
JetBrains Academy Member

My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List