Compiling Developer Express Libraries for VS.NET 2005

I’ve been using Developer Express components with VS.NET 2005 (beta 1) for a while, but nearly always in forms that I had previously created with VS.NET 2003. Now, suddenly some problems showed up when these old forms were edited, specifically with XtraGrids and XtraEditors on them. These problems were quite severe, as the VS designer would simply refrain from persisting all properties that are stored in “inner objects” of the main component.

This concept is used all over the DX libraries, for example for the Properties property in the XtraEditors library and the Styles and Views properties of the GridControl. A single modification in the designer would trigger recreation of the InitializeComponent method, thereby effectively destroying the form. The funny (and good) thing about this is that I found the necessary modifications in the source code files already. As far as I know, DX distribute compiled versions for VS.NET 2005 to the customers that need them, and I guess these versions are actually compiled with the modifications enabled. Using the standard distribution, on the other hand, these modifications are not active by default!

What you need to do is this: Add a constant DXWhidbey to the constant list of the configuration you are compiling for, for all the projects in the DX source code. If you do this within VS, it should look like this (for the Debug configuration):

You can also edit the .csproj file yourself (or use search/replace), in that case the changed line should look like this:

<DefineConstants>DEBUG;TRACE;DXWhidbey</DefineConstants>

Recompile all the libraries and voila: Working persistence in VS.NET 2005.

Sorry, this blog does not support comments.

I used various blog hosting services since this blog was established in 2005, but unfortunately they turned out to be unreliable in the long term and comment threads were lost in unavoidable transitions. At this time I don't want to enable third-party services for comments since it has become obvious in recent years that these providers invariably monetize information about their visitors and users.

Please use the links in the page footer to get in touch with me. I'm available for conversations on Keybase, Matrix, Mastodon or Twitter, as well as via email.