473,796 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 MSDataSetGenera tor
custom tool. Is there something similar for simple schemas?

Regards
Phil Lee
Nov 23 '05 #1
8 6460
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(XsdClasse sGen ) 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******@newsg roups.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: host86-132-79-96.range86-132.btcentralpl us.com
86.132.79.96
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP09.phx. gbl
microsoft.publi c.dotnet.framew ork.webservices :8476
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
MSDataSetGenera tor
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******@newsg roups.nospam> wrote in message
news:uv******** ******@TK2MSFTN GP09.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
MSDataSetGenera tor 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.publi c.dotnet.framew ork.webservices
Message-ID: <AS************ **@TK2MSFTNGXA0 1.phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Lines: 119
Path: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.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(XsdClasse sGen ) 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******@newsg roups.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: host86-132-79-96.range86-132.btcentralpl us.com
86.132.79.96
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP09.phx. gbl
microsoft.publi c.dotnet.framew ork.webservices :8476
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
MSDataSetGenera tor
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******** ******@TK2MSFTN GXA02.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.publi c.dotnet.framew ork.webservices
Message-ID: <AS************ **@TK2MSFTNGXA0 1.phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Lines: 119
Path: TK2MSFTNGXA01.p hx.gbl
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.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(XsdClasse sGen ) 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******@newsg roups.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: host86-132-79-96.range86-132.btcentralpl us.com
86.132.79.96
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP09.phx. gbl
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :8476
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
MSDataSetGenera tor
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******@newsg roups.nospam>
References: <uv************ **@TK2MSFTNGP09 .phx.gbl>
<AS************ **@TK2MSFTNGXA0 1.phx.gbl>
<BZ************ **@TK2MSFTNGXA0 2.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: host86-132-84-190.range86-132.btcentralpl us.com
86.132.84.190
Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP12.phx. gbl
microsoft.publi c.dotnet.framew ork.webservices :12710
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******** ******@TK2MSFTN GXA02.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.publi c.dotnet.framew ork.webservices
Message-ID: <AS************ **@TK2MSFTNGXA0 1.phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Lines: 119
Path: TK2MSFTNGXA01.p hx.gbl
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.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(XsdClasse sGen ) 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******@newsg roups.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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: host86-132-79-96.range86-132.btcentralpl us.com
86.132.79.96
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP09.phx. gbl
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :8476
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
MSDataSetGenera tor
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.Comp ilation.BuildPr ovider 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
XsdBuildProvide r 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
5606
by: Tim Jowers | last post by:
Can SQL Server generate an XML schema from a database? TIA, TimJowers
1
1429
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" called "transform.xml". What i need is the schema for the "transform.xml". I could generate the schema from the xml if I had "transform.xml". But I don't have access to "original.xml" so I cannot apply the transform to get
1
4183
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 the code in C# to generate a first line with UTF-8 instead of UTF-16? Thanks, public XmlSchema CreateSchemaRoot()
4
3874
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
856
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
867
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: array<ColourProc,1>^ Vision = gcnew array<ColourProc, 1>(NumberOfCamera); error C2691: 'ColourProc' : a managed array cannot have this element type
0
1608
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
2628
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
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9525
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10452
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10221
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.