An error may occur when missspelling a .NET class/enumeration and receiving Primal Sense for a static function / property /Enumeration Items.
Action:
The specific Missspelling needs to be to fail to start the expression with "[", it will occur whether the class actually exists or not.
Examples:
System.Net.NetworkInformation.Ping]::
abc]::
Location of occurence / reproducibility:
This error only occurs when the action is taken in the first line of a script.
Error:
Code: Select all
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at ActiproSoftware.SyntaxEditor.TokenCollection.get_Item(Int32 index)
at ..(IToken , Boolean , String& , Int32& )
at ..(SyntaxEditor )
at ..(SyntaxEditor , KeyTypedEventArgs )
at ActiproSoftware.SyntaxEditor.SyntaxEditor.#h3e(EditorView #N5b, Keys #oVe, Char #2Ne, Boolean #5Pe)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Not all that critical an error given its specific nature (and one can choose to simply ignore it and continue, so it's not even an application crash). Just thought I'd file it.
Environment:
OS: Windows 7 Professional x64
WMF: 3.0
PowerShell Studio: 2012 3.1.26.0
Cheers,
Fred