xsd.exe output filename

NJE picture NJE · May 25, 2009 · Viewed 18.4k times · Source

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.

Answer

AxelEckenberger picture AxelEckenberger · Jul 5, 2010

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.