Search code examples
.netxsdxsd.exe

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.


Solution

  • This link suggests another alternative ... using a path character in specifying the input schemas resets the generated file name. So if you use the following you will be able to control your output file name.

    xsd.exe schema1.xsd schema2.xsd .\schema3.xsd
    

    Will force xsd.exe to generate the schema3.cs file.

    Note: It's a hack but up to now (VS 2010) it works.