Console icon indicating copy to clipboard operation
Console copied to clipboard

[ISE] Autocomplete in XMC

Open alan-null opened this issue 2 months ago • 0 comments

Steps:

  • open ISE
  • paste: [Sitecore.Data.Items.Ite]
  • put cursor after Ite and press Ctrl+Space

AR: Image

12916 18:36:51 INFO  Auto completion requested for command in ISE session 'ISE_Editing_Session' by user: 'sitecore\Admin'
12916 18:36:52 WARN  Exception calling "CompleteInput" with "3" argument(s): "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."At line:38 char:16
+ ...      return [System.Management.Automation.CommandCompletion]::Complet ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exception: System.Management.Automation.MethodInvocationException
Message: Exception calling "CompleteInput" with "3" argument(s): "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
Source: System.Management.Automation
   at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
   at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )
   at System.Management.Automation.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

Nested Exception

Exception: System.Reflection.ReflectionTypeLoadException
Message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source: mscorlib
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.Management.Automation.CompletionCompleters.<>c.<InitializeTypeCache>b__111_0(Assembly assembly)
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Management.Automation.CompletionCompleters.InitializeTypeCache()
   at System.Management.Automation.CompletionCompleters.CompleteType(CompletionContext context, String prefix, String suffix)
   at System.Management.Automation.CompletionAnalysis.GetResultHelper(CompletionContext completionContext, Int32& replacementIndex, Int32& replacementLength, Boolean isQuotedString)
   at System.Management.Automation.CompletionAnalysis.GetResults(PowerShell powerShell, Int32& replacementIndex, Int32& replacementLength)
   at System.Management.Automation.CommandCompletion.CompleteInputImpl(Ast ast, Token[] tokens, IScriptPosition positionOfCursor, Hashtable options)
   at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )

Additional information:

Observations:

  • Completion is handled differently between 10.4 and XMC.
  • Autocomplete in 10.4 works, but there is an error logged (see case description above)
  • Autocomplete in XMC is broken; selecting a suggestion in ISE via tab, enter, or mouse click results in printing []

Below are screenshots from my debug session. Compare teResult

10.4

Image Image

XMC

Image Image

alan-null avatar Nov 04 '25 21:11 alan-null