docascode / ECMA2Yaml

Apache License 2.0
9 stars 4 forks source link

Cannot generate YAML files from ECMAXML #201

Closed dend closed 3 years ago

dend commented 3 years ago

I am pointing ECMA2YAML to a folder with XML files with the following command:

ECMA2Yaml.exe -s D:\test -o D:\prod2 --SDP

Getting the following error:

[7/22/2021 8:21:16 PM]Loading ECMAXML files...
[7/22/2021 8:21:16 PM]System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at ECMA2Yaml.ECMALoader.<>c__DisplayClass9_0.<Filter>b__1(Type t)
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at ECMA2Yaml.ECMALoader.Filter(IEnumerable`1 namespaces, FilterStore filterStore, FrameworkIndex frameworks)
   at ECMA2Yaml.ECMALoader.LoadFolder(String sourcePath, Boolean isUWPMode)
   at ECMA2Yaml.Program.LoadAndConvert(CommandLineOptions opt)
   at ECMA2Yaml.Program.Main(String[] args)
{"message":"Intenal Several Error: System.ArgumentNullException: Value cannot be null.\r\nParameter name: key\r\n   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)\r\n   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)\r\n   at ECMA2Yaml.ECMALoader.<>c__DisplayClass9_0.<Filter>b__1(Type t)\r\n   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at ECMA2Yaml.ECMALoader.Filter(IEnumerable`1 namespaces, FilterStore filterStore, FrameworkIndex frameworks)\r\n   at ECMA2Yaml.ECMALoader.LoadFolder(String sourcePath, Boolean isUWPMode)\r\n   at ECMA2Yaml.Program.LoadAndConvert(CommandLineOptions opt)\r\n   at ECMA2Yaml.Program.Main(String[] args)","source":"ECMA2Yaml","file":null,"line":null,"message_severity":0,"message_severity_string":"Error","code":"ECMA2Yaml_InternalError","date_time":"2021-07-23T03:21:16.770126Z","log_item_type":1,"log_item_type_string":"System","category":"ECMA2Yaml"}

It's unclear from the exception message as to what exactly is wrong and what parameter is missing.

dend commented 3 years ago

As it turns out, the issue is because the generated XML files did not have DocID information included. Likely something that needs to be called out in local error messages for ECMA2Yaml or in the README/documentation.

TianqiZhang commented 3 years ago

Thanks Den for letting us know, I've created https://ceapex.visualstudio.com/Engineering/_workitems/edit/466025 to track this issue.