PowerShell ISE在按下Ctrl-Space时崩溃

3

我正在运行 Windows 10 上的 PowerShell 5.1。在 ISE 中,每当我按下 ctrl-space 来获取参数选项时,就会出现这个错误。如何修复它以避免崩溃?

---------------------------
Windows PowerShell ISE - Error
---------------------------
An unexpected error has occurred, and Windows PowerShell ISE must close.
---------------------------
OK   
---------------------------

这里有一个错误的片段。 https://1drv.ms/v/s!AiMOucOyxOOXpv9HNcBhtRB_3EenRQ 这是我在事件日志中发现的错误消息:
Fault bucket 1812796752988013931, type 5
Event Name: PowerShell
Response: Not available
Cab Id: 0

Problem signature:
P1: PowerShell_ISE.exe
P2: 10.0.17133.73
P3: System.NullReferenceException
P4: System.Reflection.TargetInvocation
P5: indows.PowerShell.GuiExe.Internal.GPowerShell.Main
P6: System.RuntimeMethodHandle.InvokeMethod
P7: unknown
P8: 
P9: 
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERCFC.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD1C.tmp.xml
WPR_initiated_DiagTrackMiniLogger_One Trace User Logger_20180413 Event Collector_0_inject.etl
\\?\C:\Users\Tim\AppData\Local\Temp\WERD8A.tmp.etl
WPR_initiated_DiagTrackMiniLogger_WPR System Collector_inject.etl
\\?\C:\Users\Tim\AppData\Local\Temp\WERD8B.tmp.etl
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD88.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDA9.tmp.txt

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\Critical_PowerShell_ISE.e_e2745585682c4b8155c7a88cbc449178e619e3d_00000000_11751de4

Analysis symbol: 
Rechecking for solution: 0
Report Id: e623efbd-07de-433c-864a-d66b781fec1a
Report Status: 268435456
Hashed bucket: af516355a9c3f706f928590acfd5056b
Cab Guid: 0

尝试运行 powershell_ise.exe -NoProfile 看看是否有帮助;也许你有一些隐式加载的东西正在干扰它。 - briantist
是的,我尝试过这个,但没有成功。一旦我启动ctrl-space,ISE就会崩溃。 - ChiliYago
这现在正在最新版本中发生。在调试器中运行会显示Exception thrown: 'System.ArgumentException' in WindowsBase.dll 'Assertive' is not a valid value for property 'LiveSetting'. - Ben
1个回答

3

看起来您正在使用内部预览版。Intellisense存在两个已知问题,可能会导致致命错误或无法填充(显示灰点)。

应该通过Microsoft反馈中心报告此问题 - 搜索“powershell ISE Intellisense未工作”。

我知道这肯定会影响版本17093-17133。


在构建版本17666中,该问题已得到解决。 - Jacob

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接