You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, it would solve the failure of the current implementation when called from MSTest (for background see here):
Assert.Fail failed. Exception of type System.ArgumentException thrown as expected, but the provided predicate rejected it: System.ArgumentNullException: Value cannot be null.
Parameter name: element
at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](Assembly element)
at CommandLine.Infrastructure.ReflectionHelper.GetAttribute[TAttribute]()
at CommandLine.Text.HelpText.AutoBuild[T](ParserResult`1 parserResult, Func`2 onError, Func`2 onExample, Boolean verbsIndex, Int32 maxDisplayWidth)
at CommandLine.Text.HelpText.AutoBuild[T](ParserResult`1 parserResult, Int32 maxDisplayWidth)
The text was updated successfully, but these errors were encountered:
ohadschn
changed the title
Handle null Assembly.GetEntryAssembly in GetExecutingOrEntryAssembly
Handle null Assembly.GetEntryAssembly in ReflectionHelper.GetExecutingOrEntryAssemblyApr 22, 2019
ohadschn
changed the title
Handle null Assembly.GetEntryAssembly in ReflectionHelper.GetExecutingOrEntryAssembly
Handle null Assembly.GetEntryAssembly in ReflectionHelper.GetExecutingOrEntryAssembly
Apr 22, 2019
ReflectionHelper.GetExecutingOrEntryAssembly
is implemented like this:commandline/src/CommandLine/Infrastructure/ReflectionHelper.cs
Line 96 in a9243e9
However, going by its name it should actually be implemented like this:
Specifically, it would solve the failure of the current implementation when called from MSTest (for background see here):
The text was updated successfully, but these errors were encountered: