Autogenerate classes from xml schema .xsd file (not from dos prompt)

S

SunYour

Hi,

Does anyone know how to generate class structures from my xml schema
from Visual Studio, not by typing "xsd /c <xmlschema.xsd>" in the
command prompt
Is the "Custom Tool" property the way to go?
I have tried to create an external tool entry and set the Custom Tool
to the name of the entry, but nothing happens...

Anyone?


Best regards
/Magnus
 
G

Guest

You can download and install "XSDObjectGen", an add-on which provides you
with a new project type that does this. It is also more "feature rich" than
making a call to XSD.EXE.

Peter
 
M

Michael Nemtsev

Hello SunYour,

In the Property window of your XSD file put "Build Action = none" and "Custom
tool = "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\xsd.exe"
That's all

Class will be generated automatically

S> Does anyone know how to generate class structures from my xml schema
S> from Visual Studio, not by typing "xsd /c <xmlschema.xsd>" in the
S> command prompt
S> Is the "Custom Tool" property the way to go?
S> I have tried to create an external tool entry and set the Custom Tool
S> to the name of the entry, but nothing happens...
S> Anyone?
S>
S> Best regards
S> /Magnus
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
S

SunYour

Hello again Michael,

I'm using Visual Studio 2005 and tried to add C:\Program
Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\xsd.exe to the Custom Tool
property textbox... (Build action set to none)

What about the Custom Tool Namespace property?

Nothing happens.... I've only tried to rebuild the solution... ?

/Magnus
 
C

Chris

So here's the great thing: The workflow foundation comes with a custom
tool called WorkflowXSDGenerator that does exactly the things eveyone's
talking about.

When I started working with XSDs I already had WF installed and just
took the tool for granted (wow, I love the new VS!). Well, til the day
when I uninstalled WF and my projects with XSD stopped working.

Now my choice is either write my own custom tool, install WF again or
use some a prebuild event. Of course each one of them costs me time to
do something that previously worked.

Soooo, please Microsoft, finally give us a XSD custom tool. You already
have it in WF!!! Make it available and add-on or so.

Thanks, Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top