ablazhov
Is it possible to compile KeyLayoutAutoSwitch for .Net 4.6? The computer I am using in the office runs Windows 10 1511 and it's not supported by .Net 4.7+... Damn!
#8 · closed · 7 comments
Is it possible to compile KeyLayoutAutoSwitch for .Net 4.6? The computer I am using in the office runs Windows 10 1511 and it's not supported by .Net 4.7+... Damn!
Possibly. Try extracting this file next to KeyLayoutAutoSwitch.exe and see if it will run. [KeyLayoutAutoSwitch.exe.config.zip](https://github.com/AlexVallat/KeyLayoutAutoSwitch/files/5983515/KeyLayoutAutoSwitch.exe.config.zip)
Turns out it isn't dotNet's fault. Something else is not right with this system because KeyLayoutAutoSwitch starts normaly, but it crashes with an Unhandled exception when I try to edit a rule. Thanks anyway! P.S. KeyLayoutAutoSwitch runs fine with .Net Framework 4.6 on other systems - no .config file is needed.
Thanks for letting me know. If you want, you can post the details of the exception and I might be able to guess what's going on.
Here you go: [KLAS_UnhandledException.txt](https://github.com/AlexVallat/KeyLayoutAutoSwitch/files/5988172/KLAS_UnhandledException.txt)
Most likely cause is a missing registry key under HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts It will look there for the keyboard layout information for all your installed layouts and if the key for the layout ID is missing, WinForms will throw this error. As to how the registry could get into that state, I do not know! Maybe try uninstalling and re-installing the keyboard layout?
OMG - You nailed it !!! I found some renamed keys under HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts and now I start to remember me fiddling with these keys a long time ago trying to stop Win10 adding random keyboard layouts. Thanks! I think we should consider this issue closed?
Great, thanks for letting me know