Bug: System.FormatException in Command.cs

Topics: CAB & Smart Client Software Factory
Feb 19, 2006 at 12:10 PM
originally posted by: Jitzy_B

Command.cs
Lines 184-185.
System.FormatException - "Index (zero based) must be greater than or equal to zero and less than the size of the argument list."

Code:
182: if (adapter == null)
183: {
184: throw new CommandException(String.Format(CultureInfo.CurrentCulture,
185: Resources.CannotGetCommandAdapter, invoker.GetType()));
186: }


Seem as though the String.Format(..) is failing.

From MSDN:
"The number indicating an argument to format is less than zero, or greater than or equal to the length of the args array."

On closer inspection of Resources.CannotGetCommandAdapter:
The Command {0} cannot get an adapter for the type "{1}"

Seems it is expecting two objects to fill in for {0} and {1} but only one is being provided - invoker.GetType().

Hope that helps.

Jiten
Feb 21, 2006 at 8:21 AM
originally posted by: BradWilsonMSFT

Thanks!