commandlineparser / commandlineparser/commandline
TypeLoadException on generating help text
- Lingua principale
- C#
- Stelle
- 4.8k
- Fork
- 478
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi there,
a customer of ours gets this stack trace when our application is starting, and we are not able to determine whats going on. I traced it back in the source code to the first reflection call to getting a license attribute out of the executing assembly, but since our application is crashing immediately with no output I have to rely on whats event viewer has. And event viewer unfortunately does not tell me which type could not be loaded and why. Any ideas might be helpful:
```Application: App.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeLoadException
at System.ModuleHandle.ResolveType(System.Reflection.RuntimeModule, Int32, IntPtr*, Int32, IntPtr*, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack)
at System.ModuleHandle.ResolveTypeHandleInternal(System.Reflection.RuntimeModule, Int32, System.RuntimeTypeHandle[], System.RuntimeTypeHandle[])
at System.Reflection.RuntimeModule.ResolveType(Int32, System.Type[], System.Type[])
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(System.Reflection.CustomAttributeRecord, System.Reflection.MetadataImport, System.Reflection.Assembly ByRef, System.Reflection.RuntimeModule, System.Reflection.MetadataToken, System.RuntimeType, Boolean, System.Object[], System.Collections.IList, System.RuntimeType ByRef, System.IRuntimeMethodInfo ByRef, Boolean ByRef, Boolean ByRef)
at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeModule, Int32, Int32, System.RuntimeType, Boolean, System.Collections.IList, Boolean)
at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeAssembly, System.RuntimeType)
at System.Reflection.RuntimeAssembly.GetCustomAttributes(System.Type, Boolean)
at System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, Boolean)
at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Reflection.Assembly)
at CommandLine.Infrastructure.ReflectionHelper.GetAttribute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at CommandLine.Text.HelpText.AutoBuild[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CommandLine.ParserResult`1, System.Func`2, System.Func`2, Boolean, Int32)
at CommandLine.Text.HelpText.AutoBuild[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CommandLine.ParserResult`1, Int32)
at CommandLine.Parser+<>c__DisplayClass17_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].b__1(System.Collections.Generic.IEnumerable`1, System.IO.TextWriter)
at CSharpx.MaybeExtensions.Do[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CSharpx.Maybe`1>, System.Action`2)
at CommandLine.Parser+<>c__DisplayClass17_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].b__0(System.Collections.Generic.IEnumerable`1)
at CommandLine.ParserResultExtensions.WithNotParsed[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CommandLine.ParserResult`1, System.Action`1>)
at CommandLine.Parser.DisplayHelp[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CommandLine.ParserResult`1, System.IO.TextWriter, Int32)
at CommandLine.Parser.MakeParserResult[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](CommandLine.ParserResult`1, CommandLine.ParserSettings)
at CommandLine.Parser.ParseArguments[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1)
at App.Program.Main(System.String[])```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.