In case you missed it, there’s a very powerful tool called NDepend that helps you analyze your code structure and detect potential problems very easily. A new version, NDepend 3, was released earlier this year and the biggest new feature is probably Visual Studio integration:
It still has all the code metrics you’ll probably ever need, a custom made code query language, diagrams (some of which are still a little difficult to read) and graphs to help with analysis. See my post about the previous version for some examples.
Here are a few live examples of using NDepend: http://www.ndepend.com/Features.aspx#Tour
If you’re into code analysis you should give NDepend a try. With this new version it’s more usable than before and it still has the same very powerful analysis engine under the hood. Check out http://www.ndepend.com for more info.
/Emil
Today, we finally found a way to run NUnit tests in .Net 4 assemblies in TeamCity! Here’s the solution:
Problem with NUnit runner when using MSBuild 4.0
/Emil
SQLite and unit testing is a great combination for testing database operations without having to manage database files. You can simply create an in-memory database in your setup code and work with that. Perfect in combination with NHibernate for example.
If you want to do this in the current .Net 4.0 beta your out of luck though, you'll get an exception:
The solution is pointed out by Jomo Fisher. What you do is to include this snippet in the application config file:
When unit testing assemblies that references System.Data.SQLite.DLL then you have to put that snippet in NUnit's config file (C:\Program Files\NUnit 2.5.2\bin\net-2.0\nunit.exe.config).
If you combine this with the tip in my post NUnit with Visual Studio 2010 Beta 2, you should insert the following
plus
under the runtime tag.
This works for me, hopefully it will for you as well.
/Emil
I just found a very useful XSD for editing log4net configurations:
Just copy the schema file to C:\Program Files\Microsoft Visual Studio *\Xml\Schemas and add the correct namespace to the log4net element in your config file:
/Emil
Here's a tip of how to run NUnit tests in .Net 4 code:
Running NUnit 2.5 against Visual Studio 2010 .Net 4 code
Note that it's the NUnit.exe.config file in C:\Program Files\NUnit 2.5.2\bin\net-2.0 that should be updated.
I was recently contacted by Patrick Smacchia, one of the developers behind NDepend and he asked me if I'd like to try it out, which I did. This is a report of my first impressions.
If you're not familiar with NDepend, it can be described as a tool to analyze a set of .Net assemblies for code quality. I suppose its name indicates that it originally was focused on analyzing dependencies but these days that name is rather misleading, in my opinion, as it can do much more that that. I'll go through some of its capabilities below.
When you first analyze a set of assemblies, NDepend displays a screen similar to this:
If you're like me, then you didn't check out any tutorials or web casts before running the tool and your first reaction is likely "Holy cow! What's all this?" or something similar.
It turns out that there is a ton of useful information in these displays but you have to know how to interpret them which takes a little learning.
Briefly, here's what I gathered so far:

In addition to the displays described above, an HTML report is also generated after analyzing assemblies. It displays much of the same information as the graphical and interactive displays above, but also contains the "Abstract vs instability diagram":
Obviously you want to be in the green area with all your assemblies, but the dimensions used might not be completely clear at first sight. This seems to be a good article describing it it detail.
So, what are my first impressions? Well, I must say that NDepend really is a very powerful tool for analyzing code but it does require investing some time to use its many features properly. To me, that seems like an investment well worth doing.
/Emil
[powered by WordPress.]
jour·nal n. A personal record of occurrences, experiences, and reflections kept on a regular basis; a diary.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
34 queries. 0.831 seconds