Google
WWW Yariv Hammer's Code Site

Tuesday, August 29, 2006

Generating a DataSet From an Xml Schema in 2005

Introduction
In Visual Studio 2003 the DataSet designer and the Xml Schema designer were the same. In order to generate a Typed DataSet from an Xml Schema, you had to right-click on the Xml Schema designer, and check the Generate DataSet option. Everytime you saved the schema, the DataSet was redrawn for you.

In Visual Studio 2005 we have two seperate designer - one for Typed DataSets and one for Xml Schemas. The option to generate a Typed DataSet from an Xml Schema disappeared from the menus.

How To Generate the DataSet
In the Xml Schema designer, right-click on the designer surface and select Properties (or press F4).
At the Property Grid find the CustomTool property and type MSDataSetGenerator.
The typed dataset will be generated for you when you save the schema. You can see the files in the Solution Explorer.

Thoughts
I have no idea why Microsoft removed the option to generate the DataSet from the menu. The new interface for it is very uncomfortable in my opinion.

2 Comments:

At 4:58 AM, February 26, 2008, Anonymous MA said...

Thank you!

I agree that the new dataset designer is very uncomfortable to work with.

 
At 8:01 PM, March 26, 2008, Anonymous Anonymous said...

I've been looking for an alternative way to the "generate dataset" option from VS2003 in VS2005 to easily create a Typed Dataset from an XSD for hours now. I can't believe the answer was so short and simple. I'll try this home tonight and I hope it will work.

 

Post a Comment

<< Home

Feel free to use everything here. Add links to my site if you wish.

Do not copy anything to other sites without adding link to here.

All the contents of the site belong to Yariv Hammer.