Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing the Nuget package when targeting W10 1511 #1

Open
arcadiogarcia opened this issue Jul 7, 2016 · 5 comments
Open

Comments

@arcadiogarcia
Copy link

When trying to install the Nuget package into a UWP JS app, this error appears:

Could not install package 'Microsoft.Band.WindowsRuntime 1.3.0'. You are trying to install this package into a project that targets 'UAP,Version=v10.0.10586', 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.

Is this because the package only targets 10240? Is there any way to solve this?

@philliphoff
Copy link
Owner

The Windows Runtime Component in the Nuget package does target 10586 by default, but also includes 10240 as a minimum target. This package was intended for use with a "native" (i.e. C++) Windows application; I've not tested it with a JavaScript application (and get the same error as you when attempting to add the package).

I believe that the component itself should work with a JavaScript application, but it likely just has to be packaged in a different way. Unfortunately, the documentation for packaging Windows Runtime Components in all their flavors and targets isn't very clear (e.g. the package layout is very different between native applications and .NET applications).

@arcadiogarcia
Copy link
Author

You are right, referencing the runtime component directly and including the .dll's in my project did the trick! I'll try to find out what is the right way to package it to be consumed from JS

@arcadiogarcia
Copy link
Author

I spoke too soon! I can get the firmware version following the example, but when trying to access the different managers (sensorManager, notificationManager...) of the client I obtain a reference to the client again. I believe that it is because of the war you return a reference to 'this' casted as different interfaces, it is returning the same reference but it is not updating the methods it shows, I will fork it and try if I can get it to work.

@philliphoff
Copy link
Owner

BandClient implements all of the various "manager" interfaces, so returning this is appropriate. I don't know how the JavaScript debugger would display that kind of an implementation, however.

@arcadiogarcia
Copy link
Author

Yes, Intellisense has no problem displaying the appropiate suggestions, but when I execute it the JavaScript runtime seems to get confused by it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants