Run lprun.exe with Command line parameters
Hi,
We're trying to execute lprun.exe from batch file like
E:\LINQPad\lprun.exe "E:\cart\build\scripts\Main.linq" ParamaterOne
When running it always generate below error.
Arguments:System.String[]
Input string was not in a correct format.
at System.Text.StringBuilder.FormatError()
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0)
at UserQuery.Main(String[] args)
Could you please help?
We're trying to execute lprun.exe from batch file like
E:\LINQPad\lprun.exe "E:\cart\build\scripts\Main.linq" ParamaterOne
When running it always generate below error.
Arguments:System.String[]
Input string was not in a correct format.
at System.Text.StringBuilder.FormatError()
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0)
at UserQuery.Main(String[] args)
Could you please help?
Comments
void Main(string[] args) { args.Dump(); }
and am able to execute it with LPRun (LINQPad v5.25) with no problems.
It sounds like you have some code in your UserQuery that is throwing this error. Specifically, it looks like you are using a format string that .NET doesn't like.
I can replicate your problem using
string.Format("{}", args).Dump();
fixing it to usestring.Format("{0}", args).Dump();
works.Thank you, will try again.
Regards.