Microsoft Band and WPF

443 views Asked by At

I have downloaded the sample code for Band SDK for Windows. Then I added a new WPF project and grabbed the latest SDK through Nuget (Version 1.3.10518.1). Now under packages\Microsoft.Band.1.3.10518\lib, the following folders are contained:

  • netcore451
  • portable-net45+win+wpa81
  • portable-win81+wpa81
  • wpa81

Now as I need .NET 4.5 support I have referenced the Microsoft.Band.dll from the portable-net45+win+wpa81. Everything OK so far, but to reference the BandClientManager I also need to reference the Microsoft.Band.Windows.dll. Here is the problem, because this dll is only contained in the netcore451 and when I try to reference that particular dll I get the following exception:

A reference to "Samples\packages\Microsoft.Band.1.3.10518\lib\netcore451\Microsoft.Band.Windows.dll" could not be added. The project targets '.NETFramework' while the file reference targets '.NETCore'. This is not a supported scenario.

Error when referencing

Clearly I have a .NET Framework 4.5.1 selected as the target framework. I was searching on the web to get the .NET Core but could not find any information if WPF is even supported when using .NET Core. Is there a Microsoft.Band.Windows.dll that targets .NETFramework, so I could use it in WPF project?

2

There are 2 answers

0
Phil Hoff -- MSFT On BEST ANSWER

The current Band SDK does not support Windows desktop (i.e. Win32) applications. It supports only Windows Store and Windows Phone (i.e. WinRT) applications.

Portable libraries can be confusing as the terms '.NETCore' and 'netcore451' refer to the Windows Store version of the .NET framework.

0
Mark Rowe On

Try making a universal app, you can connect through bluetooth to PC. That is the closest you can get right now. If you need to reach out, working on trying to write a better sample for SDK (though failing miserably due to bandclient issues from anywhere but code behind).

Ill update with codeplex location after we get this hammered out.