Trying to generate a Dataset from XSD file in VS 2005

I have a VB.NET project.  In this project I have a schema.xsd file.  I would like to generate a .cs file to go with the .xsd file.  I've found here on EE and other places talk about right clicking on the xsd window and selecting "Generate Dataset".  In VS 2005 when I right click I get all of the other options that I've seen in pictures but I don't get the "Generate Dataset" option (I don't get the Auto Arrange option either).  If I select the Schema menu at the top I see the same options.  Again, Generate dataset is missing.

The descriptions I've seen where this is on the menu are talking about VS 2003.  In VS 2005 Professional I'm not seeing that option.  Is there something in the options I need to check to make this show up or has it been moved somewhere else?  I guess they could have just removed the functionality as well but I would hope not.

Any ideas anyone?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlazearAuthor Commented:
I found an article that describes how to do what I want using the VS Command Prompt: 

However, I still would like to find out why this doesn't show on my menu.
1. just add new item DataSet....
2. on the designer, select your datasource (Server Explorer-> Data Connections)
(or, use items on the Toolbox there are items like TableAdapter, DataTable, Query)
3. and drag and drop your datasource(table, sp,...) on the designer..
4. to configure more, chose Data menu--> configure
(or context menu--> configure)

first time it was little bit un-familiar, but after couple of times pratice it gets better results and easier configuration practice than vs2003

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StiReport report = new StiReport();
DataSet dataSet = new DataSet("Test");

Dim Report As StiReport = New StiReport()
Dim Data As DataSet = New DataSet("Test")
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Here's how to generate it from within VS2005:

Select the XSD file you want VSNET 2005 to generate typed-dataset from
Go into the XSD files properties
Set the Build Action to Content 
Set the Custom Tool to point to MSDataSetGenerator 
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.
mlazearAuthor Commented:
I split the points between the two of you.  vb_jonas answer was exactly what I was asking but I like having multiple ways to do things and xp_umer added interesting information with the programmitical way of doing it.

mlazearAuthor Commented:
Thanks for the help!

I should explain a bit more of what I'm trying to do.  I've created an XSD file which is the definition of an XML file that I'm going to write out to disk.  It won't be stored in any form of a database other than a simple XML text file.

xPert Umer:
I tried the steps you suggested but I get lost.  I can add a new DataSet and I see the options that you describe (TableAdapter, Query, ...) but I'm not sure what I'm supposed to be dragging onto the Designer.  The XML file is my data source and it doesn't yet exist because I'm trying to create the code from my XSD file in order to create the XML file.  Data menu, Configure is grayed out but that is probably because I haven't dragged a datasource on to the Designer yet.

Will your methodology work when all I have is an XSD file that I've created using the Designer (the Designer that shows a toolbox labeled "XML Schema") ?

Thanks for the code in your second post that might be very useful as well.

The steps worked but my .vb file did not show up.  In order to make it show up you have to go to Project, Show All Files.  Then the Schema.xsd file shows a plus in the Solutions window that can be clicked on.  When you click on it you then see "Schema.Designer.vb" and a couple other files.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.