如何引用引用nuget包的Windows运行时组件?

时间:2016-06-26 18:13:31

标签: visual-studio windows-runtime nuget win-universal-app microsoft-band

我正在尝试使用UWP JavaScript应用程序中的Microsoft Band SDK,但由于它仅作为Nuget包提供,我正在尝试创建一个允许我从Band SDK中调用某些方法的Windows运行时组件来自我的应用程序。

我已经能够在C#中成功创建和构建一个引用Microsoft.Band Nuget包的运行时组件,并且我已经从我的JS应用程序中引用了它。该应用程序是正确构建和部署的,但是当我尝试从我的组件中调用方法时,我遇到了运行时错误:

Exception is about to be caught by JavaScript library code at line 26, column 8 in ms-appx://7c21d66f-b8e1-486b-94af-eec2bcef9a13/js/default.js

0x80070002 - JavaScript runtime error: The system cannot find the file specified.



System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Band, Version=1.3.20420.1, Culture=neutral, PublicKeyToken=608d7da3159f502b' or one of its dependencies. The system cannot find the file specified.

   at System.Runtime.InteropServices.WindowsRuntime.ManagedActivationFactory.ActivateInstance()

WinRT information: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Band, Version=1.3.20420.1, Culture=neutral, PublicKeyToken=608d7da3159f502b' or one of its dependencies. The system cannot find the file specified.

   at System.Runtime.InteropServices.WindowsRuntime.ManagedActivationFactory.ActivateInstance()

If there is a handler for this exception, the program may be safely continued.

似乎应用程序无法找到Nuget包,即使它被运行时组件引用。我错过了任何一步吗?我是否必须在其他地方指定依赖项?我无法在文档中找到有关此方案的任何信息。

0 个答案:

没有答案