The blog of Eric Sibly; focusing on mountain biking, .NET development for the Desktop, Smartphone and PocketPC.

Thursday, December 08, 2005

Design time in VS.NET 2005 – aarrgghh…

I wrote some custom controls for the Pocket PC (.NET CF 2.0) using Visual Studio 2005 recently. They were working fine in the designer right up to the point where I needed to do a P/Invoke – at which point the designer experience disappeared – just a generic bounding box. This obviously sucked and needed to be fixed!

This then lead to this article and this article. Something about adding a “DesignTimeAttributes.xmta” file to your project; now go look in the .NET help for a reference to this. I dare ya! That’s right there is nothing – wow, fantastic, a new undocumented feature – that is just marvelous. It seems like a good feature, just a weird and undocumented way of getting to it.

Well, just having this file is not enough to fix the problem, you now need “DesktopCompatible(true)” as identified in the next page of the first article. Again, no mention of this in the .NET help.

So I compile again, errors – wtf! Now I get some cryptic “genasm.exe” error. This then turns up this thread which helps to identify that I have a public generic List property that is causing the problem, which Microsoft acknowledges, but they *might* get to it in Service Pack 1. This is RTM right?!? Holy crap, so now I have to dumb down my class to get it to compile.

It now compiles and the design time experience is back. So now I have some undocumented file and attributes defined within my project and a dumbed down class – fantastic innovation within the platform – NOT!

So the questions is – do I have an ordinary design experience or a fully functioning class that can use a generic list? I chose the latter!


Post a Comment

<< Home