Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 632365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:04:06+00:00 2026-05-13T20:04:06+00:00

Update 2: Seems that this library is not Compact-Framework aware at all and I

  • 0

Update 2:
Seems that this library is not Compact-Framework aware at all and I keep getting other exceptions – I am leaving this question as is, but I think you should not waste time on answering it.
I opened another question for suggestion of other compact-framework friendly libraries.


Using the Command Line Parser Library.

I am using the following code to define the command line arguments:

[Option("d", "duration", Required = true,  HelpText = "text.")]
public int duration = DEFAULT_TEST_DURATION;

[Option("s", "sleeptime", HelpText = "text.")]
public int sleepTime = DEFAULT_TEST_SLEEP;

[Option("p", "pause", HelpText = "text.")]
public int iterInterval = DEFAULT_TEST_INTERVAL;

[Option(null, "nosync", HelpText = "text.")]
public bool nosync = false;

[Option(null, "nosuspend", HelpText = "text.")]
public bool nosuspend = false;

[Option(null, "reboot", HelpText = "text.")]
public bool reboot = false;

[HelpOption(HelpText = "Dispaly this help screen.")]
public string GetUsage()
{
    HelpText help = new HelpText("MyExe");
    help.AddPreOptionsLine("Usage: MyExe -d 500 -s 20 -p 10 --nosync");
    help.AdditionalNewLineAfterOption = true;
    help.AddOptions(this);
    return help;
}

I am getting TargetInvocationException on help.AddOptions(this). The trace is:

System.Reflection.TargetInvocationException was unhandled
  Message="TargetInvocationException"
  StackTrace:
       at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess, StackCrawlMark& stackMark)

If the rest is needed please comment and I will post it.

I could not find in the documentation for MethodInfo that it throws this exception and so I can’t see why I am getting it.
I use this the same way the sample of the library does and I don’t get an exception in the sample application.

I guess that the reason lies in the fact that I am compiling this for a smart device. Probably has to do with support in the CF3.5, but I am not sure.

Using VS2008.

Update:
I should have mentioned that the sample runs on the full framework whereas my app runs on the compact version.

I noticed that MethodInfo in CF3.5 does not have a ReturnParameter property as opposed to the full framework version.

Also as an answer to the answer below the InnerException gives MissingMethodException

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:04:06+00:00Added an answer on May 13, 2026 at 8:04 pm

    the library is not designed for the Compact-Framework

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 318k
  • Answers 318k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try this: preg_replace("/\w*?$keyword\w*/i", "<b>$0</b>", $str) \w*? matches any word characters… May 14, 2026 at 12:00 am
  • Editorial Team
    Editorial Team added an answer No, the request validation is for the entire request or… May 14, 2026 at 12:00 am
  • Editorial Team
    Editorial Team added an answer You need to implement the didStartElement and didEndElement methods and… May 14, 2026 at 12:00 am

Related Questions

I have a Java background so I’m used to having Maven handle all problem
My python project has a C++ component which is compiled and distributed as a
Here's a really frustrating Actionscript 2 problem I have with movie clips associated with
After asking about what Visual Studio does to register a COM Library , it
I'm very new to JSON, and I need to parse some that an API

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.