I have been trying to register the Windows.Devices.Bluetooth
, so that I can work with the code found at http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.bluetooth.rfcomm.aspx
Even though I have the SDKs installed from VS 2013 Pro Update 3, and the Windows 8 SDKs, the only place I have found these assemblies is in the C:\Windows\System32 folder.
When I try to register them into my project I am getting "A Reference to 'C:\Windows\System32\Windows.Devices.Bluetooth.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
I have tried this when running VS as admin and without.
Anyone else have this issue, and how did you get over this obstacle?
Check your PCTurn Bluetooth on and off: Select Start , then select Settings > Devices > Bluetooth & other devices . Turn off Bluetooth, wait a few seconds, then turn it back on. Remove the Bluetooth device, then add it again: Select Start , then select Settings > Devices > Bluetooth & other devices ..
Right-click the Bluetooth icon present on the notification center of the taskbar. Select Open Settings. Select More Bluetooth options. Check Allow Bluetooth devices to find this PC (to protect your privacy, select this check box only when you want a Bluetooth device to find your computer).
On your PC, select Start > Settings > Devices > Bluetooth & other devices > Add Bluetooth or other device > Bluetooth. Choose the device and follow additional instructions if they appear, then select Done.
The solution is a combination of everything.
<TargetPlatformVersion>8.0</TargetPlatformVersion>
to the csprojThe default System.Runtime that is part of core does not contain the System.Attribute that the Windows.winmd needs to do anything.
This means that I can now build desktop console applications to work with bluetooth as long as my deployment target is Windows 8.0 and higher.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With