Questions tagged [xsd.exe]

The XML Schema Definition (Xsd.exe) tool generates XML schema or common language runtime classes from XDR, XML, and XSD files, or from classes in a runtime assembly. It is a part of the Microsoft .NET SDK.

References

346 questions
59
votes
2 answers

How to create a XSD schema from a class?

I'm having a hard time with the XSD files. I'm trying to create an XSD file from a class: public enum Levels { Easy, Medium, Hard } public sealed class Configuration { public string Name { get;set; } public Levels Level { get; set; } …
Darf Zon
  • 6,268
  • 20
  • 90
  • 149
45
votes
2 answers

Automatically generate C# from XSD in Visual Studio IDE

I am running Visual Studio 2010. I have a XSD schema and want to use xsd.exe tool to generate appropriate C# file. I have done this successfully from a command line but now I want to do the same from IDE. Is there some well-known route for this? I…
wpfwannabe
  • 14,587
  • 16
  • 78
  • 129
42
votes
5 answers

where to find xsd.exe in visual studio 2013 on windows 8

I have used the xsd.exe utility in Visual Studio 2003 and 2008 to generate typed datasets from a 3rd party XSD file. The third party has changed their schema so I need to regenerate the datasets but I can't find XSD.EXE. The win8 search gives me…
user3010967
  • 421
  • 1
  • 4
  • 3
36
votes
1 answer

Why does xsd.exe generate string property for xs:integer?

When I generate a c# class from a xsd schema with xsd.exe I find this behaivor a bit wierd. My element: is generated to: [System.Xml.Serialization.XmlElementAttribute(DataType="integer",…
Glenn
  • 1,955
  • 2
  • 15
  • 23
34
votes
4 answers

xsd.exe output filename

Is there a way to control the output filename from xsd.exe? My specific issue is that if an imported xsd is referenced this is added to the filename.
NJE
  • 739
  • 1
  • 7
  • 14
28
votes
3 answers

What is the correct way of using the Guid type in a XSD file?

I have a .xsd file which I use to generate code with the xsd.exe tool from Visual Studio. Some class members are Guids and the xsd.exe tool gives 2 warnings: Namespace 'http://microsoft.com/wsdl/types/' is not available to be referenced in this…
erbi
  • 1,242
  • 1
  • 12
  • 14
27
votes
2 answers

using xsd.exe to generate c# files, getting error and warnings

This is the command i'm running: xsd.exe -c -l:c# D:\Documents\DEV\SARPilot\Docs\schemas\06-141r2\06-141r2.xsd These are the errors i'm getting: Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version…
capdragon
  • 14,565
  • 24
  • 107
  • 153
26
votes
5 answers

Tool that can combine many XSD files into one?

I need to create XML serializer classes for approximately 65 XSD files, for which I am using Microsoft's XSD.EXE to generate the C# code... However, I keep running into Window CMD's character limit in the resulting output file (in which XSD.EXE…
ewall
  • 27,179
  • 15
  • 70
  • 84
25
votes
5 answers

Is svcutil.exe a replacement for xsd.exe?

I am using xsd.exe to generate some c# classes from a .xsd file. I ran into the same issue that is covered here and on other sites where xsd.exe generates Type[] arrays instead of generic List collections for types in the .xsd file. Some people…
jameswelle
  • 1,367
  • 1
  • 15
  • 26
24
votes
3 answers

Is the "xsd" command not supported in Visual Studio 2012 command window?

I've read that it is possible to run xsd commands right in visual studio (2010). I have VS 2012 on my machine and when I run xsd XMLFile.xml I get Command "xsd" is not valid. So, is the "xsd" command not supposted in VS 2012 and is there any…
20
votes
4 answers

XSD.exe and "Circular Group references"

I am attempting to build some classes so that I can deserialise an XML file created by a third party application. Luckily the developer of the 3rd party application included a schema file with their code so that the XML file can be understood. When…
BENBUN Coder
  • 4,801
  • 7
  • 52
  • 89
20
votes
5 answers

I can't find xsd.exe in Visual Studio 2008?

In Visual Studio 2005 the XSD compiler was in the SDK/v2.0 directory. In Visual Studio there is only a SDK/v3.5 directory has gone and so too has the xsd.exe compiler. Where has it gone?
AnthonyLambert
  • 8,768
  • 4
  • 37
  • 72
18
votes
3 answers

Nullable value with xsd.exe generated class

I have been using xsd.exe to generate a class for deserializing XML into. I have decimal value in the source xsd that is not required: The resulting class from xsd generates the…
Don Vince
  • 1,282
  • 3
  • 18
  • 28
18
votes
2 answers

Prevent DebuggerStepThroughAttribute from applying to my non-xsd-generated partial class?

I used the xsd.exe tool to generate a class based on my xml schema. It created a public partial class with DebuggerStepThroughAttribute. Well, I created another partial class file for this class to write my custom code and want to be able to…
Lyndal
  • 371
  • 1
  • 3
  • 8
16
votes
2 answers

Create MULTIPLE class files based on an XSD

I may be attempting something that is not possible with the XSD tool but I wanted to ask before moving on to a simpler solution. I have an XSD file that has multiple elements (and multiple complex types) that will generate multiple classes in one…
TheDevOpsGuru
  • 1,570
  • 5
  • 21
  • 36
1
2 3
23 24