Automatically generate C# from XSD in Visual Studio IDE

前端 未结 2 1569
遇见更好的自我
遇见更好的自我 2020-12-23 16:41

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

2条回答
  •  春和景丽
    2020-12-23 17:07

    You can also add it as an external tool (click tools - external tools...) to visual studio (2015). Then just select the xsd schema in visual studio and click tools - xsd to generate the class file.

    Parameters:

    • Command: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools\xsd.exe (replace with your version of FX tools)
    • Arguments: /c "$(ItemDir)$(ItemFileName)$(ItemExt)"
    • Initial directory: $(ItemDir)
    • Use Output window: yes

提交回复
热议问题