1

I need to generate csharp classes from a bunch of XSD files, the problem I'm coming across now is there're lots duplicated classes generated from the imported schemes, this is quite annoying.

I tried wscf.blue, xsd2code, but cannot solve it. For xsd2code, there's an option in xsd2code 'ExcludeImportedTypes', unfortunately with setting the value to 'True', it always crashed my vs2013, vs2010. For wscf.blue, I can generate all the classes in separated files, but over 600 files got generated, and I need a way to combine all the files in one class, which is also requires manual modification.

Is there any approach to suppress generating classes for all the imported schemes?

Elaine
  • 1,288
  • 5
  • 17
  • 35
  • Make sure that the namespaces are correct, else it will be 'duplicated'. – leppie Jul 09 '14 at 08:08
  • @leppie, the namesapce is the same for all the schemas. I have many schemas(A) and the schemas have many imported schemas(B) as well, the classes generated from schemas(A) have the same classes since they reference same set of schemas(B). – Elaine Jul 09 '14 at 08:20
  • Can you make a small example that causes this? And post it here? Also, you can use WSDLMerge to merge them as a last resort. – leppie Jul 09 '14 at 08:21
  • 1
    @leppie thank you, I will have a try first – Elaine Jul 09 '14 at 13:46

0 Answers0