Click here to Skip to main content
15,880,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am developing a desktop wpf application which connects windows 8 tablet with BLE device over Bluetooth. Win8 metro app supports apis for Bluetooth via Windows.Devices.Bluetooth.Rfcomm namespace as given in the link https://code.msdn.microsoft.com/windowsapps/Bluetooth-communication-7130c260

I tried porting the same to Win 8 desktop application by changing targetplatform as 8 in Project settings and adding references to dlls as given in https://software.intel.com/en-us/articles/using-winrt-apis-from-desktop-applications
but get the following exception on executing the application

An exception of type 'System.BadImageFormatException' occurred in but was not handled in user code

Additional information: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)

Mine is a 32 bit system and on changing the build configuration to x86 also getting the same error.Please let me know what could be the issue.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900