473,385 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 6432
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.