woensdag 27 december 2006

VS.NET 2005: XML View of a Typed DataSet

Although I'm not a big proponent of (typed) DataSets ~ I rather use custom business classes ~ , I do have to use them every once in a while.

When I use a typed dataset in VS.NET 2003, I always use 'typed DataSet Annotations'.
This is very easily done in VS.NET 2003: you'll have to switch from DataSet view to XML View, and this can easily be done by the handy buttons that you can see in the lower-left corner:

Clicking on 'XML' would give you the XML view of your typed Dataset; simple as that.

A few days ago, I was working in VS.NET 2005, and I wanted to create a typed DataSet ... I wanted to use the 'annotations' like I was used to do in VS.NET 2003.

I was amazed to find out that those handy XML / DataSet View buttons that exist in VS.NET 2003 are gone in VS.NET 2005.
Apparently, Microsoft doesn't like the idea that developers sometimes want to tweak some settings via code instead of via the properties window ? At least, that's how I'm thinking about it.

After some searching, I've found out that it is still possible to get the XML View of a DataSet in VS.NET 2005, but damn, it is very well hidden.
Here's how you can see the XML definition of the DataSet:

  • Right click on the DataSet file

  • You'll see the following context-menu:

    Select the 'Open With option'

  • The following Dialog Box opens:

    Select the 'XML Editor' option

  • Now, you can see the XML View of the DataSet definition

As you can see, in VS.NET 2005, 3 user interactions are needed in order to go to your destination, instead of just a single click in VS.NET 2003.
Not very productive IMHO.

I wonder why Microsoft has removed those buttons that existed in VS.NET 2003...

1 opmerking:

Frederik Gheysels zei

A link to an article that describes some of the new-style annotations in VS.NET 2005:

This is interesting, since these properties are listed on MSDN, but their purpose is not described on MSDN.