Monthly Archives: May 2008

NDC Badges arrived

I got all psyched up today – the entrance badges for NDC 2008 arrived the office today. One step closer to the coolest developer conference in Norway to this date (I’m probably stepping on a few toes with that statement..)

Heres a nice picture of it taken with my crappy mobiletelephone camera :


Microsoft Source Analysis for C#

Microsoft announces Source Analysis for C#. It is very similar to Static Code Analysis (FxCop), but instead of doing on the binaries it performs the analysis on the actual C# code.

Read more about it here


ReSharper 4.0 Beta for VS2008 is out

We’re finally closingin on the release of the version 4.0 of the every so brilliant ReSharper.

You can find here

Among other things the beta offers quite a bit of C# 3.0 features:

– New code analysis, context actions and quick-fixes;

– New refactorings (such as Convert to Extension Method,
Convert to Automatic Property, Convert Anonymous Type to Named);

– Updated IntelliSense.

TFS Build Task for generating the build version

Martin Woodward posted earlier about how to go about aligning build numbers with assembly versions in TFS2008.

We used to do the same thing as he describes for our builds, but I found it really annoying having to have a file in the file system that the build task relied on and needed to be updated whenever one needed to delete the last build (oh yes, it happens – probably shouldn’t – but it does.. 🙂 )

The build task I came up with was a task that queried the buildserver for the builds and got the last build and retrieved the buildnumber and increased according to our build numbering strategy (We increase the revision (last number) by one for every build and the build number (the one ahead) by one for every hotfix). The task automatically handles all this by looking at the buildquality indicator that is used by testers (or at least should be used by them) to indicate the quality of the build. Our current scenario says that if it is marked with “Ready for deployment” it should increase the “hotfix” number.

I’ve attached the entire solution

, below you’ll se a snapshot of the Execute() method, it relies on a couple of other methods
and properties found in the class.


To use the task, simply override the BuildNumberOverrideTarget as follows:


XNA Workshop at METU in Turkey – dates changed

The dates have changed for my workshop at METU in Turkey. The 23rd of June and for four whole days we’ll have training in Xna, with focus on Xna 3.0.

We will try cover all of Xna in these four days, ranging from 2D and 3D graphics to sound and networking through Xbox Live as well.

MSBuild Task for generating testrunconfig file

**** <UPDATE Date=”22nd of may 2008″> ****

You have to add the namespace specification in front of every element.
Create a XNamespace by doing :

XNamespace microsoftNamespace =;

Then for all the XElements do new XElement(microsoftNamespace + “<tagname>”);

**** </UPDATE> ****


I’ve been working a bit with automating our build process and creating a lot of CI builds. Today I started getting our builds to run all the tests, create code coverage and then run static code analysis for it all. Getting the code coverage demands that the assemblies run during unit testing are all instrumented. Normally on the client side you just have a .testrunconfig file attached configured with all the assemblies. This same file could be used from the MSBuild running on the TFS as well as Buck Hodges blogged about a while back, but it would demand human interaction whenever assemblies were added or removed. I figured I had to come up with a remedy to this and created my own MSBuild task to handle it all.


The above code outputs the correct XML needed as input for the unit test run. So in your MSBuild file you need to use the same file for output through this task as the RunConfigFile property used bu the TFS TeamBuild.

.net (generic) type caching

The runtime for .net has a type caching mechanism that is really great. Every so often I write code where you need specific data based upon a type. Normally one tend to revert to a Dictionary with Type as the key and the datatype as the valuetype for the generic parameters.



This will then rely on he dictionary and its implementation. Sure, it is not a bad solution, but there is a more effective and last but not least; cooler way of going about achieving the same effect:


The beauty of this is that the static constructor will run once per type and one can do type specific stuff in the constructor

The two implementations above lack a lot, so lets go for a more complete sample:


XNA Creators Club – new design & Community Games beta

Yesterday, Microsoft launched a completely redesigned creators club site alongside with a beta of the community games.

Just entering the site after logging in, you can see how easy it is to submit a community game:


The site is intuitive to use and in my opinion has a great design. Keep up the good work guys!

Flash 10 comes with hardware accelerated 3D

The new beta version of Flash 10 comes with hardware acceleration for 3D. This could prove to be the real advantage point Flash needs over technologies such as Silverlight.

As a C# developer and eager games developer, I’d love to see this in Silverlight. I’ve always wondered why one have been relying on software rendering in RIA technologies such as Flash and Silverlight when the graphics adapter is perfectly capable of doing this a lot better than the CPU. Let the CPU do what its good at and the graphics adapter likewise. For cross-platform compatibility one could use OpenGL as a platform for this. I guess doing that would be quite the camel to swallow for Microsoft, an abstraction of some sort would enable them to take advantage of DirectX on the Windows platform and OpenGL on Mac and Linux or any other platform. The only issue would be devices such as a Windows Mobile or a Nokia mobile telephone that wouldn’t be as powerful in 3D rendering. But I think that problem should be left to the content developer to choose how advanced graphics they want in their content.

Anyhow, the Flash 10 beta can downladed here and some samples can be found here.

Circle of life

As a response to Fredrik Kalseths blog about circle of interest and a subtle hint in his post that it would be interesting to see my circles (sounds a bit kinky, doesn't it), here goes :




It seems that I have a lot that I define as my core, but I think it reflects what I really care about. I could probably add a couple of more technologies in it, but I think it is more than sufficient. 🙂

Anywho, the background for all this is Paul Stovells post about the circle of interest (I know I called it circle of life, but then again computing pretty much consumes my life).

It was quite interesting doing this, you have to really stop and think things over. I challenge anyone reading this to do the same.