The code works fine on Windows 10
,
but I'm getting TargetInvocationException
in Windows 8.1
when using uwp bluetooth APIs in my .NET 5
winforms app
inner exception is
Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
code:
private BluetoothLEAdvertisementWatcher BTWatch = new BluetoothLEAdvertisementWatcher();
in my project I have added reference to "UwpDesktop-Updated" package & windows SDK 10.0.17763.132 is installed on my Windows 8.1
machine.
Let me know how to fix this issue occurring on windows 8.1
TargetInvocationException when using uwp bluetooth APIs in .NET 5 winforms app
I'm afraid you can't run it in Windows 8.1 system, please refer BluetoothLEAdvertisementWatcher
document, the support lowest version is Build 10240, and it will not work in Windows 8.1 system.
User contributions licensed under CC BY-SA 3.0