Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HelpText.AutoBuild fails on Linux #256

Open
aggieben opened this issue Oct 14, 2015 · 3 comments
Open

HelpText.AutoBuild fails on Linux #256

aggieben opened this issue Oct 14, 2015 · 3 comments
Labels

Comments

@aggieben
Copy link

Here's the output when I try to run my command with --help:

sbAppDev@sb-docker:~/proj/cm-core/src/Cm.Util$ dnx cmutil dbm --help
info    : [Cm.Util] Running cmutil 1.0.0-beta in /home/sbAppDev/proj/cm-core/src/Cm.Util
info    : [Cm.Util] LogLevel configured to Information
System.InvalidOperationException: CopyrightInfo::Default requires that you define AssemblyCopyrightAttribute or AssemblyCompanyAttribute.
  at CSharpx.MaybeExtensions.FromJustOrFail[AssemblyCompanyAttribute] (CSharpx.Maybe`1 maybe, System.Exception exceptionToThrow) [0x00000] in <filename unknown>:0
  at CommandLine.Text.CopyrightInfo.get_Default () [0x00000] in <filename unknown>:0
  at CommandLine.Text.HelpText.AutoBuild[Object] (CommandLine.ParserResult`1 parserResult, System.Func`2 onError, System.Func`2 onExample, Boolean verbsIndex) [0x00000] in <filename unknown>:0
  at CommandLine.Text.HelpText.AutoBuild[Object] (CommandLine.ParserResult`1 parserResult) [0x00000] in <filename unknown>:0
  at CommandLine.Parser+<>c__DisplayClass17_0`1[System.Object].<DisplayHelp>b__1 (IEnumerable`1 _, System.IO.TextWriter writer) [0x00000] in <filename unknown>:0
  at CSharpx.MaybeExtensions.Do[IEnumerable`1,TextWriter] (CSharpx.Maybe`1 maybe, System.Action`2 action) [0x00000] in <filename unknown>:0
  at CommandLine.Parser+<>c__DisplayClass17_0`1[System.Object].<DisplayHelp>b__0 (IEnumerable`1 errors) [0x00000] in <filename unknown>:0
  at CommandLine.ParserResultExtensions.WithNotParsed[Object] (CommandLine.ParserResult`1 result, System.Action`1 action) [0x00000] in <filename unknown>:0
  at CommandLine.Parser.DisplayHelp[Object] (CommandLine.ParserResult`1 parserResult, System.IO.TextWriter helpWriter) [0x00000] in <filename unknown>:0
  at CommandLine.Parser.MakeParserResult[Object] (CommandLine.ParserResult`1 parserResult, CommandLine.ParserSettings settings) [0x00000] in <filename unknown>:0
  at CommandLine.Parser.ParseArguments (IEnumerable`1 args, System.Type[] types) [0x00000] in <filename unknown>:0
  at CommandLine.ParserExtensions.ParseArguments[SupervisorCommand,MigrationsCommand] (CommandLine.Parser parser, IEnumerable`1 args) [0x00000] in <filename unknown>:0
  at Cm.Util.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
  at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
  at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain (Microsoft.Dnx.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in <filename unknown>:0
  at Microsoft.Dnx.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
  at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
  at Microsoft.Dnx.Host.Bootstrapper.RunAsync (System.Collections.Generic.List`1 args, IRuntimeEnvironment env, System.Runtime.Versioning.FrameworkName targetFramework) [0x00000] in <filename unknown>:0

Exact same code and dnx version works fine on Windows desktop CLR.

Stack:
Mono 4.0.4 (Stable 4.0.4.1/5ab4c0d)
dnx 1.0.0-beta7 Mono/Linux/x64

@gsscoder
Copy link
Owner

gsscoder commented Nov 2, 2015

#250 explains why I'm replying late...

Hi @aggieben, can I know what version of Command Line Parser are you using?

Thank you.

@aggieben
Copy link
Author

aggieben commented Nov 2, 2015

Up to this point I have been using 2.0.273-beta.

@gsscoder
Copy link
Owner

There was an issue with --help, but it was recently fixed.

  1. Can you post your Options class?

  2. Have tried executing the same app on Windows?

P.S.: please try use sources from GitHub, latest is 2.0.275-beta; it's always a good idea build from sources: not all fixes make the version change (also if normally this happens).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants