0

我刚刚下载了 Microsoft Band SDK Preview 并尝试将其连接到我的 C++/CX Windows 通用应用程序项目。Nuget 在下面给我一个错误,我可以通过 C++ 代码使用 SDK 预览吗?

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

似乎问题对于将托管程序集安装到 C++ 项目是通用的,但我还没有设法找到解决方法。

4

2 回答 2

2

Band SDK 预览版 (1.3.10219-preview) NuGet 包不专门针对 Windows 运行时组件,这意味着它不能(直接)由 C++ 或 JavaScript Windows 运行时组件库使用。作为替代方案,您可以创建一个 Windows 运行时组件库(C# 或 VB),该库包含您需要的 Band SDK 部分,然后从您的 C++ 或 JavaScript 组件中使用该库。

于 2015-02-25T18:53:14.960 回答
0

我的猜测是 Band SDK 仅适用于 VB.NET 和 C# 项目 - 我尝试将它用于 WP JavaScript 应用程序,但我遇到了同样的问题。

我没有从 Microsoft 或其他任何人那里看到有关此问题的任何信息。也许因为 JS / C++ 项目不是 100% 托管语言(有本地 C++ 和 Visual C++ [托管]),它不支持它们(如果我错了请纠正我,我对内部了解不多)。希望在未来的版本中。

于 2015-02-25T02:42:16.377 回答