Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2005

Tip: Looking for answers? Try searching our database.

Generate class from schema (VS.NET 2005)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Lee - 04 Nov 2005 19:52 GMT
I'm sure this is possible but I just can't see how to do it.  I want to add
schemas to my solution and have C# classes automatically generated from
them.  I can see how to generate typed DataSet's with the MSDataSetGenerator
custom tool.  Is there something similar for simple schemas?

Regards
Phil Lee
Kevin Yu [MSFT] - 05 Nov 2005 08:02 GMT
Hi Phil,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
Signature

=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Steven Cheng[MSFT] - 06 Nov 2005 07:54 GMT
Hi Phil,

Welcome to webservice newsgroup.
Regarding on the Auto code generating from XSD file in VS.NET 2005, there
hasn't build-in  Custom Tool for this. Currently the  available ones is
still the DataSet generator and WSDL proxy generator. For  custom class
generating from xml schema, we can still use the Xsd.exe  provided by
VS.NET 2.0 sdk like we do in vs.net 2003/.net 1.x....   You can run the
xsd.exe from VS.NET 2005 command prompt window....   In addition, in VS.NET
2003, there has a external custom tool addin(XsdClassesGen ) writen by
Chris Cells:

http://www.sellsbrothers.com/tools/#xsdClassesGen

For .net 2.0/VS.NET 2005 since it has just been released, I think it may
take some further time to have such a new verion available.

Thanks for your understanding.

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "Phil Lee" <phil.lee@newsgroups.nospam>
Subject: Generate class from schema (VS.NET 2005)
Date: Fri, 4 Nov 2005 18:52:54 -0000
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <uvLq2DX4FHA.3948@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: host86-132-79-96.range86-132.btcentralplus.com
86.132.79.96
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8476
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I'm sure this is possible but I just can't see how to do it.  I want to add
schemas to my solution and have C# classes automatically generated from
them.  I can see how to generate typed DataSet's with the
MSDataSetGenerator
custom tool.  Is there something similar for simple schemas?

Regards
Phil Lee
Steven Cheng[MSFT] - 09 Nov 2005 12:15 GMT
Hi Phil,

How are you doing on this thread, does the info provided in my last reply
helps a little?
If there're anything else we can help, please feel free to post here.
Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
X-Tomcat-ID: 186537628
References: <uvLq2DX4FHA.3948@TK2MSFTNGP09.phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001_7E1F845E"
Content-Transfer-Encoding: 7bit
From: stcheng@online.microsoft.com (Steven Cheng[MSFT])
Organization: Microsoft
Date: Sun, 06 Nov 2005 07:54:17 GMT
Subject: RE: Generate class from schema (VS.NET 2005)
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Message-ID: <ASVmTdq4FHA.1144@TK2MSFTNGXA01.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 119      
Path: TK2MSFTNGXA01.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8505
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Phil,

Welcome to webservice newsgroup.
Regarding on the Auto code generating from XSD file in VS.NET 2005, there
hasn't build-in  Custom Tool for this. Currently the  available ones is
still the DataSet generator and WSDL proxy generator. For  custom class
generating from xml schema, we can still use the Xsd.exe  provided by
VS.NET 2.0 sdk like we do in vs.net 2003/.net 1.x....   You can run the
xsd.exe from VS.NET 2005 command prompt window....   In addition, in VS.NET
2003, there has a external custom tool addin(XsdClassesGen ) writen by
Chris Cells:

http://www.sellsbrothers.com/tools/#xsdClassesGen

For .net 2.0/VS.NET 2005 since it has just been released, I think it may
take some further time to have such a new verion available.

Thanks for your understanding.

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
From: "Phil Lee" <phil.lee@newsgroups.nospam>
Subject: Generate class from schema (VS.NET 2005)
Date: Fri, 4 Nov 2005 18:52:54 -0000
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <uvLq2DX4FHA.3948@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: host86-132-79-96.range86-132.btcentralplus.com
86.132.79.96
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:8476
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I'm sure this is possible but I just can't see how to do it.  I want to add
schemas to my solution and have C# classes automatically generated from
them.  I can see how to generate typed DataSet's with the
MSDataSetGenerator
custom tool.  Is there something similar for simple schemas?

Regards
Phil Lee
Phil Lee - 14 Nov 2005 09:17 GMT
Steven,

thanks for the help.  I have decided to just manually generate the classes
using xsd.exe, or perhaps put in a build event as suggested by Cordell
Lawrence.

Regards
Phil Lee
> Hi Phil,
>
[quoted text clipped - 85 lines]
> Regards
> Phil Lee
Steven Cheng[MSFT] - 14 Nov 2005 11:01 GMT
Thanks for your followup, Lawrence.

And please feel free to post here when you need any further help.

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Phil Lee" <phil.lee@newsgroups.nospam>
References: <uvLq2DX4FHA.3948@TK2MSFTNGP09.phx.gbl>
<ASVmTdq4FHA.1144@TK2MSFTNGXA01.phx.gbl>
<BZiSOdS5FHA.2672@TK2MSFTNGXA02.phx.gbl>
Subject: Re: Generate class from schema (VS.NET 2005)
Date: Mon, 14 Nov 2005 09:17:59 -0000
Lines: 111
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <u6$jWxP6FHA.3880@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: host86-132-84-190.range86-132.btcentralplus.com
86.132.84.190
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.webservices:12710
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Steven,

thanks for the help.  I have decided to just manually generate the classes
using xsd.exe, or perhaps put in a build event as suggested by Cordell
Lawrence.

Regards
Phil Lee
> Hi Phil,
>
[quoted text clipped - 85 lines]
> Regards
> Phil Lee
Mork - 15 Nov 2005 21:20 GMT
Phil,

This might be of interest to you. Aaron Skonnard wrote a
System.Web.Compilation.BuildProvider implementation that monitors
changes to your *.xsd files and generates the code for them. This
obviously is only for Web projects. Go here
http://pluralsight.com/blogs/aaron/archive/2005/09/13/14794.aspx and
follow the link to the demos. Look in that *.zip file for
XsdBuildProvider to get started.

HTH.

Cheers,
Dan Mork
Mork - 21 Nov 2005 16:18 GMT
Phil,

This is more what you're looking for:
http://www.sellsbrothers.com/tools/#xsdClassesGen

Cheers,
Dan Mork
Cordell Lawrence - 07 Nov 2005 20:11 GMT
Phil, I've ran into this problem just last week. One way to deal with it is
to use your Build Events under int the configuration for you VS (both 2003
and 2005) project. On your pre-build event command line, you can execute the
XSD.exe on any file you choose before you build. This is more difficult to
maintain than having a custom-tool, but it'll get the job done.

Hope this helps,
Cordell Lawrence
Teleios Systems Ltd.

> I'm sure this is possible but I just can't see how to do it.  I want to
> add schemas to my solution and have C# classes automatically generated
[quoted text clipped - 4 lines]
> Regards
> Phil Lee

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.