Dot Net Micro Framework – What's Missing for Existing C# Developers

by Steve 11. August 2009 10:17

I'm a long term C# developer, from .net 1.0 to working day to day in .Net 3.5, so the thought of being able to write code for embedded devices in C# with the Dot Net Micro Framework is to good to be true.

However, it didn't take long before the Micro part of the Micro Framework took hold and the penny dropped that it really was micro and the CLR was different, so I thought I would share my initial findings as if you are coming into Micro Framework development like me with a history of WinForms and ASP.NET it can feel like a big leap back in time.

A quick look at the Add Reference Dialog Box tells the story.

A V3 Micro Framework Class library project Add Reference dialog box:

 

Compare that the C# 3.5 WinForms project Add Reference dialog box:

Somewhat of a difference! I have intentionally put the WinForms project at the NUnit references to highlight that they are not available for the micro framework whilst being in the GAC. Actually at present I have not found any unit testing framework for the micro framework, even the MS Test framework is missing from the references.

Another major loss is the lack of Generics. No <T> in Micro Framework projects. Apparently this would have made the underlying image to big, which is a real shame as generics adds a huge amount of value and cuts down on a lot of repeated code. And yes, this means no List<T> and it's back to ArrayList of object - ouch!

Many of the day to day tools that existing C# developers may be use to using also don't function with micro framework projects. Reg-Gate's popular Ants performance and Ants memory profilers don't work (as of V5.1) which is a huge shame as memory usage and performance are especially important for embedded systems. NUnit doesn't care much for the micro framework either, although I've only tried V2.4.8 which complained about Generics. I could go on – in short don't assume your favourite tool/component will work with the micro framework!

The good news is that it's not all bad news!

Reflector works a treat (is their nothing that program can't do!).

 

 

Resharper still does it's thing, I'd be lost with out it!

The .csproj is still a MSBuild file.

Many of the great C# 3.0 features work (e.g. Auto-Properties, var)

You can still write separate class library projects as with regular .net so component reuse is really easy and this should help the unit testing story (if only I could find a framework!).

It's still one of the best IDE's I've tried for embedded development and C# is a great language!.

Tags:

Micro Framework

Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Something about the author

Tag cloud

Month List

Page List