472,954 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

Generate class from schema (VS.NET 2005)

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
Nov 23 '05 #1
8 6402
Hi Phil,

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

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Nov 23 '05 #2
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

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "Phil Lee" <ph******@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: <uv**************@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!TK2MSFT NGP09.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

Nov 23 '05 #3
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.

"Phil Lee" <ph******@newsgroups.nospam> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
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

Nov 23 '05 #4
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

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

--------------------
X-Tomcat-ID: 186537628
References: <uv**************@TK2MSFTNGP09.phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001_7E1F845E"
Content-Transfer-Encoding: 7bit
From: st*****@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: <AS**************@TK2MSFTNGXA01.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 119
Path: 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

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "Phil Lee" <ph******@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: <uv**************@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!TK2MSFT NGP09.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

Nov 23 '05 #5
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
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:BZ**************@TK2MSFTNGXA02.phx.gbl...
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

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

--------------------
X-Tomcat-ID: 186537628
References: <uv**************@TK2MSFTNGP09.phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_0001_7E1F845E"
Content-Transfer-Encoding: 7bit
From: st*****@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: <AS**************@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

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "Phil Lee" <ph******@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: <uv**************@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!TK2MSFT NGP09.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


Nov 23 '05 #6
Thanks for your followup, Lawrence.

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

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "Phil Lee" <ph******@newsgroups.nospam>
References: <uv**************@TK2MSFTNGP09.phx.gbl>
<AS**************@TK2MSFTNGXA01.phx.gbl>
<BZ**************@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**************@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!TK2MSFT NGP12.phx.gbl
microsoft.public.dotnet.framework.webservices:1271 0
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
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:BZ**************@TK2MSFTNGXA02.phx.gbl...
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

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

--------------------
X-Tomcat-ID: 186537628
References: <uv**************@TK2MSFTNGP09.phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_0001_7E1F845E"
Content-Transfer-Encoding: 7bit
From: st*****@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: <AS**************@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

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "Phil Lee" <ph******@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: <uv**************@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!TK2MSFT NGP09.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



Nov 23 '05 #7
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/a.../13/14794.aspx and
follow the link to the demos. Look in that *.zip file for
XsdBuildProvider to get started.

HTH.

Cheers,
Dan Mork

Nov 23 '05 #8
Phil,

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

Cheers,
Dan Mork

Nov 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Jowers | last post by:
Can SQL Server generate an XML schema from a database? TIA, TimJowers
1
by: M Ali | last post by:
Hi, I am in a situation where I don't have access to an xml, say "original.xml". But I do have the schema for it and an XSLT transformation on it that would create a new xml from "original.xml"...
1
by: comic_rage | last post by:
Hi, I am writing code with C# to generate xml schema, however, the following code generate a UTF-16 in the first line. This will create some problems. How can get the code/missing what part of...
4
by: Serdge Kooleman | last post by:
hi how to use my class from another class (.Net 2005) i have web project (one page) and created a class MyClass in separate file, the same folder, included in project.
0
by: TonyF | last post by:
Hi I'm trying to append a text file from input from a TextBox for some reason I get the fowwlowing output: frh001wa2555655 f fr frh frh0 frh00
0
by: AngZangGui | last post by:
How can I create a pointer to a class in C++ 2005. I doing it for a Window Forms Application. Eg. This is how it used to be like in MFC. ColourProc Vision These are the errors I gotten:...
0
by: Curious | last post by:
I have a .NET project. Just wonder how to automatically generate a class diagram showing all of the class hierarchy and their associated methods.
4
by: lostangel696 | last post by:
Could somoene please guide me on how i would go about generating a schema using minidom inferred from an xml document that i have made. Thankyou
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
1
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.