Main contents

.NET Category Archive

Unable to set TestContext property for my class (.NET Compact Framework)

12 August 2008

Suppose you’re using Visual Studio 2008 and you’ve just found out that Microsoft added unit test support for the Compact Framework on devices and emulators. Neat-o! So you add one to your project thinking, this’ll be fantastic. Then it doesn’t work. You get the following cryptic error: Unable to set TestContext property for the class [...] Read more »

Posted in .NET | 2 Comments »

The WPF Application Class: Overview and Gotcha

1 August 2008

I’ve written often lately about WPF, including BabySmash posts and Missing .NET articles. I’ve decided to do a complete app using WPF. I’ve dabbled here and there with the concepts, but I’ve decided I don’t really know the framework that well. I still have to look up how to do something basic like master-detail data [...] Read more »

Posted in .NET | 12 Comments »

Exporting Blog Posts from Subtext in BlogML

16 July 2008

I’ve recently been asked for more detail on how I extracted my blog posts from Subtext. I hacked my solution together in a few nights of hacking. Once I got it working, I completely flushed all memory of what I did. But I was asked a whole two times, dear readers! With that overwhelming curiosity, [...] Read more »

Posted in .NET | No Comments »

The Missing .NET #6: Version Tolerant Serialization

7 July 2008

In .NET 1.1, serialization (binary serialization, to be clear) is a bit hairy when you’re successful enough to ship multiple versions of your product and you don’t consider versioning until the first bug report about serialization problems. Changing the type, by either adding or removing fields, in .NET 1.1 causes previous versions of your type to lose their mind. The only way to deal with it was to implement ISerializable, which is fraught with problems, not the least of which is it makes you entirely responsible for serialization and deserialization of the whole type for ever and ever. When we found this out, this mass hysteria gripped us, so every serializable type had to implement ISerializable, even it were new to the next version, which is now a maintenance nightmare. We also got sloppy and applied the same boilerplate serialization code to every type. So we didn’t handle it well, but you didn’t really have a choice in .NET 1.1. Read more »

Posted in .NET, Missing .NET | 2 Comments »

The Missing .NET #5: Tracepoints

16 June 2008

Lately, I’ve been debugging windowing code often. Windowing code is stuff like window sizing, resizing, painting, etc.; code that has something to do with drawing the window. Debugging that code used to be fairly arduous because anytime you stepped into your method, looked around, then started execution again, the windowing code would need to be re-run because you had Visual Studio focused and not your app; since you have a breakpoint in the windowing code, Visual Studio would break into your method which you probably didn’t want this time because you were already there, so you hit F5 again to continue execution and start the cycle over. Read more »

Posted in .NET, Missing .NET | 1 Comment »