Unhandled Exception: System.TypeLoadException: Could not load type 'List' from assembly
Hi
This tool looks very promising, and I’d like to use it with our ECF XSDs. However, I’m encountering an error during the process.
I’ve attached a ZIP file containing the XSDs along with the error details. Could you please review and advise?
thanks Lucky
Error is
Unhandled Exception: System.TypeLoadException: Could not load type 'List' from assembly 'XmlSchemaClassGenerator.Console, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.Type.GetType(String typeName, Boolean throwOnError) at XmlSchemaClassGenerator.Console.Program.<>c__DisplayClass0_0.<Main>b__23(String v) at Mono.Options.Option.Invoke(OptionContext c) at Mono.Options.OptionSet.Parse(String argument, OptionContext c) at Mono.Options.OptionSet.Parse(IEnumerable`1 arguments) at XmlSchemaClassGenerator.Console.Program.Main(String[] args)
You need to specify the fully qualified type name, e.g, --ct System.Collections.Generic.List`1.
Also, some of the other options like --outputTypes do not exist in xscgen.
I suggest starting from a minimal command line and then tweak to your liking.
Specifying all the xsd files on the command line (**/*,xsd) didn't work for me, perhaps because there are duplicated xsd files. However, specifying xsd/message/*.xsd worked.