Any comments on Sandcastle?

To be honest – even though I installed Sandcastle quite a while ago I didn’t really got around to use it.

But since Kevin Downs announce the discontinue of NDoc I had to come up with some kind of replacement. So how about this castle-thinggy? So I hooked up with some MSBuild-script to get my documentation rolling.

Some 30 minutes later – and the vast peak of 650 MB of RAM which where consumed by the processe (thanks to Process-Explorer for providing this insight!) I finally had some nice CHM-file representing the documentation of one of my projects. I was already quite exited to finally see some light of documentation again.

When I looked at the documentation I realized, that everything from my projects was neatly documented – just as promised; well – everyting? Not really, there was some small piece missing: like all the code-comments that where supposed to be in the documentation!!!

Well, what the heck was BuildAssembler doing the last 30 minutes? It sure as hell was doing any documentation!! So after a periode of denial and disbelief I finally started to do some research on why this strange behavior would be.

It turned out, that Sandcastle would expect a comments.xml file in the directory from which Sandcastle is being started (not the directory where the tools reside!). OK – so what next? I don’t have just one XML-file containing my documentation, and it’s not even called comments.xml.

After digging deep into the config-files of sandcastle I finally figured that I could change comments.xml in the sandcastle.config and replace that with an expression (containing wildcards) which would identify my own XML-files.

So some 30 minutes later I finally found myself with a brand new documentation …

Unit-Testing with HttpContext

One big bummer of unit-testing (especially with nunit) is, that you cannot test web-based code.

OK, so I kinda gave up on that one. But I recently developed quite some code, targeted to ease development of web-based apps. So this code is making use of the HttpContext in order to get to know something about who’s actually make the request etc.

So with regards to Phil Haacked I wrote a little method to inject a fake HttpContext and thus could at least write some unittest for my project.

But unfortunatly HttpContext.Current.User is returning null – so I might have to look a little bit around. I already figured, that Phil did an update on his original post – I’ll check that out!