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; }
public ConfigurationSpec { get;set;}
}
public abstract class ConfigurationSpec { }
public class ConfigurationSpec1
{
// ...
}
public class ConfigurationSpec2
{
// ...
}
Please note that I have an abstract class inside of Configuration. With that feature, is it possible to create the XSD and if it's possible how?
The idea is to pass the class Configuration to the XSD.
You can use
XSD.exe
(Available from your Visual Studio Installation.)results in
All you have to do is compiling your assembly and run
XSD.exe
with the path to your assembly as argument.XSD.exe /?
has a list of all arguments as well.Example:
XSD.exe C:\Dev\Project1\Bin\Debug\library.dll