Get-PSReadLineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.
See original GitHub issueEnvironment data
& {
"PS version: $($PSVersionTable.PSVersion)"
"PSReadline version: $((Get-Module PSReadline).Version)"
if ($IsLinux -or $IsOSX) {
"os: $(uname -a)"
} else {
"os: $((dir $env:SystemRoot\System32\cmd.exe).VersionInfo.FileVersion)"
}
"PS file version: $((dir $pshome\pwsh.exe).VersionInfo.FileVersion)"
}
PS version: 6.0.0-rc.2
PSReadline version: 2.0.0
os: 6.1.7601.17514 (win7sp1_rtm.101119-1850)
PS file version: 6.0.0
$PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-rc.2
PSEdition Core
GitCommitId v6.0.0-rc.2
OS Microsoft Windows 6.1.7601 S
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.0-rc.2}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Steps to reproduce or exception report
Get-PSReadLineOption
Get-PSReadLineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.
At line:1 char:1
+ Get-PSReadLineOption
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PSReadLineOption], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.GetPSReadLineOption
Get-PSReadLineKeyHandler
Get-PSReadLineKeyHandler : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.
At line:1 char:1
+ Get-PSReadLineKeyHandler
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PSReadLineKeyHandler], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.GetKeyHandlerCommand
note : the issue template dont reference ‘pwsh.exe’
Issue Analytics
- State:
- Created 6 years ago
- Comments:29 (11 by maintainers)
Top Results From Across the Web
PSConsoleReadLine exceptions - powershell
It's a known issue in the Windows 10 October Update, and can be resolved with a patch as discussed in this Github thread....
Read more >[Solved] PSReadLine not working in PowerShell 6
PowerShell.GetKeyHandlerCommand. Get-PSReadLineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception ...
Read more >PowerShell history is not working? Check out these solutions
Get -PSReadLineOption : The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception. At line:1 char:1
Read more >PSReadline 2.0 not working on Windows 10 1809
It throws the following error: “The type initializer for 'Microsoft.PowerShell.PSConsoleReadLine' threw an exception.” Solution: I had a look ...
Read more >Updating help for the PSReadLine module in Windows ...
Fortunately the fix is simple. Just rename the folder to C:\Program Files\WindowsPowerShell\Modules\PSReadLine . To rename this folder, you must ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eliohann you would need a new build of PSReadLine. There isn’t a new beta coming soon, but you can pick up the nightly build which has the fix: https://ci.appveyor.com/project/lzybkr/PSReadLine/branch/master/artifacts
@eliohann I installed the nightly build by replacing files in
C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0
And now it works with my custom keyboard layout !