Generate Typed Dataset from an XSD file
Visual Studio 2005’s Typed DataSet is pretty cool. It gives you good control of what the relations should be and it pretty much mimics a table in the database. I love it. But one thing I hate about that is when you serialize your Typed DataSet your XML looks not up to the mark of what you want.
It does serves the purpose but it has all sorts of primary key/foreign key references that are serialized into the XML that at times we don’t want. Rather what we want is a nested XML structure that meaningfully makes sense if you wear that XML glass.
Adding an XSD file to your project won’t help right away as VSNET 2005 doesn’t directly generate dataset (.Designer.cs file) out of it. But, to our rescue, there is a work around to get VSNET 2005 generate typed-dataset from an XSD file. Here is what you should do,

- Select the XSD file you want VSNET 2005 to generate typed-dataset from
- Go into the XSD file’s properties
- Set the "Build Action" to "Content"
- Set the "Custom Tool" to point to "MSDataSetGenerator"
And that’s it. The next time you save the XSD file you should be able to see the dataset file, .Designer.cs (or .vb) file, for your XSD.
Visit DemoGeek.com for amazingly detailed quality articles on Computer, Internet, Browsers, Software, Programming and much more.

Written by askars. Read more great feeds at is source WEBSITE
no comments.
Read more articles on .NET Framework and otherSoftware and .NET Framework 2.0 and howto and Visual Studio and .Net and Tips and Tricks.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article















