Is svcutil.exe a replacement for xsd.exe?

后端 未结 5 916
一生所求
一生所求 2021-01-31 09:44

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

5条回答
  •  余生分开走
    2021-01-31 10:31

    Yes, svcutil.exe can be used as a replacement for xsd.exe but it sounds like you are having trouble getting generic collections to be generated. svcutil.exe has a collectionType switch that allows you to specify the type to be used for a collection:

    svcutil /o:Svc.cs /ct:System.Collections.Generic.List`1 http://example.com
    

提交回复
热议问题