Connecting Microsoft Band SDK Preview to C++ project - windows-runtime

I have just downloaded the Microsoft Band SDK Preview and trying to connect it to my C++/CX Windows Universal App project. Nuget gives me an error below, any way I could use the SDK preview from C++ code?
Install-Package : Could not install package 'Microsoft.Band 1.3.10219-preview'.
You are trying to install this package into a project that targets 'Native,Version=v0.0',
but the package does not contain any assembly references or content files that are
compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Microsoft.Band -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
It seems the problem is generic to installing managed assemblies to C++ projects, but I haven't managed to find the workaround yet.

The Band SDK Preview (1.3.10219-preview) NuGet package does not specifically target Windows Runtime Components, which means it cannot be consumed (directly) by C++ or JavaScript Windows Runtime Component libraries. As an alternative, you could create a Windows Runtime Component library (C# or VB) that wraps the portion of the Band SDK you need and then consume that library from your C++ or JavaScript component.

My guess is that the Band SDK is only for VB.NET and C# projects - I've tried getting it for a WP JavaScript application, but I ran across the same problem that you are having.
I haven't seen anything from Microsoft or anyone else about this issue. Perhaps since the JS / C++ projects aren't 100% managed languages (there's native C++ and Visual C++ [managed]), it doesn't support them (correct me if I'm wrong, I don't know much about the internals). Hopefully in a future release.

Related

NU1202: MySql.Data.Entity isn't compatible with monoandroid81

I am trying to start my first Xamarin project and I got some issue while trying to install the MySqlEntity NuGet package.
Severity Code Description Project File Line Suppression State
Error NU1202 Package MySql.Data.Entity 6.10.8 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package MySql.Data.Entity 6.10.8 supports: net452 (.NETFramework,Version=v4.5.2) Refo_T3.Android C:\Users\evyat\source\repos\Refo_T3\Refo_T3\Refo_T3.Android\Refo_T3.Android.csproj 1
I tried this solution: Xamarin.Android: Package XX is not compatible with monoandroid81 (MonoAndroid,Version=v8.1)
and I still end up with errors.
It's my first application on Xamarin platform, I used to code in .NET but I decided to test my luck with Xamarin.
I couldn't find any more useful information online and I need your better experience.
Thank You :)
As written on the nuget packages page, the package is only available for .net framework >= 4.5.2
So you can't install it for Xamarin Android project only classic desktop .Net Framework applications.

VS 2015 + universal app + mvvmcross 3.5.0 + sqlite

I started a new universal app using vs 2015 ctp 5, mvvmcross 3.5.0 + sqllite plugin 3.5.0.
I am using the famous N=.... serie of vídeos, especificaly n=12 Collect A Bull as a reference.
I created a new pcl Project as a core and a universal app Project(3 projects), added nuget packages to core , wp8.1 and to w8.1, everything good so far.
Then i copied the service folder from N=12 sample, added related nuget packages.
My trouble is: at this line _connection = factory.Create("collect.sql"); on repository i've got a exception :
A first chance exception of type 'System.DllNotFoundException' occurred in Cirrious.MvvmCross.Plugins.Sqlite.WindowsCommon.DLL
Additional information: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The message is pretty clear cannot found sqlite3.dll i've seen some articles to add file and reference manually, but i did not see nothing on the vídeo, and the N-12 sample runs ok?
How the sample can access the mentioned sqlite dll, it could be related to universal app?
By comparison i found a missing reference in wp project: Community.CsharpSqlite.WP7 i added manually but does not solve.
Any suggestions?
So, to solve this i just have to download from http://www.sqlite.org/download.html and add reference manually
Thanks to mohibsheth on jabbr room
Try adding
Install-Package MvvmCross.HotTuna.Plugin.Sqlite -Version 3.2.1
from package manager console. It worked for me.
If directly it didn't worked, then remove all the packages and add all packages of version 3.2.2 like :
Install-Package MvvmCross -Version 3.2.2
Install-Package MvvmCross.HotTuna.Plugin.FieldBinding -Version 3.2.2
Install-Package MvvmCross.HotTuna.Plugin.Messenger -Version 3.2.2
Still having problem with the packages?Uncheck Silverlight from Core project properties.
Version 3.5.0 raising problems for me too.
Hope this helps.
I would check out the SQLite.Net-PCL project. I've heard of some success in people using that although I have not personally used it yet.
I just submitted a pull request to the MvvmCross Community SQLite project to update it to MvvmCross 3.5 and unified iOS API - so you could give that a try as well. There is no new NuGet for that yet however. You'll need to clone the project and compile it yourself.

Cant use NuGet to add Unity IoC to a portable class library

I am making a Windows Phone 8 application, however because I would like at some point to also publish this application for Windows 8.1 store I made the effort to factor out the application logic into a portable class library. All good so far.
Now being a good boy I want to use an IoC container, unity by preference (since I am familiar with it in desktop and Win Phone 8 only apps)
So here's my problem; the NuGet Unity package will not install into my portable application with this result:
Installing 'Unity 3.0.1304.1'.
Successfully installed 'Unity 3.0.1304.1'.
Adding 'Unity 3.0.1304.1' to Logic.
Uninstalling 'Unity 3.0.1304.1'.
Successfully uninstalled 'Unity 3.0.1304.1'.
Install failed. Rolling back...
Could not install package 'Unity 3.0.1304.1'. You are trying to install this package into a
project that targets 'portable-net45+wp80+win', but the package does not contain any assembly
references or content files that are compatible with that framework. For more information,
contact the package author.
So is there a unity that works with a PCL? or is this just a shortcoming of the NuGet package?
I failed to find any useful documentation on the P&P website to indicate what platforms it is compatible with, but I know it does support WP8 at the least since the NuGet package is quite happy with libraries targeting just that.
Any guidance from the community would be very welcome here I don't want to abandon using a PCL for my app logic if I can avoid it, but if it comes down to a toss up between that and NuGet for package management I will in order to keep the NuGet goodness.
Could this be related to NuGet and Portable Class Libraries - Package doesn't target any framework? that seems more related to making your own NuGet packages for use in your own PCLs.
Unity 3.0.1304.1 does not contain any PCL assemblies so you will not be able to install it into a PCL project using NuGet.
The Unity NuGet package contains assemblies that target the following frameworks:
.NETFramework 4.5
.NETCore 4.5 (Windows Store/WinRT)
Windows Phone 8
You can see these target frameworks if you open the NuGet package into NuGet Package Explorer or download the NuGet package and open it using a program that supports zip files such as 7zip or Windows built-in zip file support.
So your possible options are:
Just use Unity in your main Windows Phone 8 application.
Write your own IOC container.
Use an IOC container that supports PCL projects such as Portable.CommonServiceLocator.
Compile your own PCL version of Unity.
Use a later version of Unity 3.5 since this includes a PCL assembly targeting portable-net45+wp80+win8+MonoAndroid10+MonoTouch10
Updated: 2014-05-11
Unity 3.5 now includes a PCL assembly that targets portable-net45+wp80+win8+MonoAndroid10+MonoTouch10 which will install into a project that targets portable-net45+wp80+win.
There is no Unity for PCL, but you can use Ninject for example.

Microsoft Visual C++ Runtime Package framework is missing the framework dependency declaration in the manifest

I receive the following error on the Windows App Certification Kit for Windows 8.1.
The app manifest test detected the following errors:XXX takes a
dependency on Microsoft Visual C++ Runtime Package
(Microsoft.VCLibs.110.00) framework but is missing the framework
dependency declaration in the manifest.
My solution builds with zero errors. However, I receive an error after I create an app package and run the Windows Application Certification Kit.
I have added and removed references to the C++ runtime extension.
In addition, I do not see any fields in the app manifest editor to modify that would resolve this dependency error.
It sounds like you are including a library that was built with Visual Studio 2012. You will need to rebuild that library in Visual Studio 2013. If you just have the binary you will need to get an updated version from the author.
..
Or
Rename "Microsoft.VCLibs.110" to Name="Microsoft.VCLibs.110.00",
Or
Add a reference in your project to Microsoft Visual C++ Runtime Package
Add reference and find this Package. Adding this should resolve your problem

Error Adding MvvmCross NuGet package to PCL in VS2013

When I try to install MvvmCross on my PCL, I get the error message below. I am running Visual Studio 2013 and the Xamarin Frameworks are installed for the PCLs.
I'm using Profile78, which targets .net framework 4.5, windows store apps (windows 8) and higher, Windows Phone 8, Xamarin.Android, and Xamarin.iOS.
Is there a better profile for me to use?
Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying to install this package into a project that targets 'portable-net45+wp80+win+MonoAndroid10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
This area is changing with many new releases from many different places. I don't believe there are any definitive answers here today. There's a walkthrough using the latest platforms on http://slodge.blogspot.co.uk/2013/11/quick-run-through-using-pcls-in.html
That walkthrough uses:
Xamarin - iOS 1.8 & Android 4.10
Nuget - 2.7.2
MvvmCross - 3.0.14-beta3
Visual Studio 2012
portable profile 158
Other setups may also work - I don't know if anyone knows which is "better" - but it would be interesting to hear opinions!