visual-studio-2012 - 将 NuGet ndef 库添加到 Windows Phone 8 项目

标签 visual-studio-2012 nuget nfc windows-phone-8 ndef

因此,我尝试在 Visual Studio 2012 中为 Windows Phone 8 应用程序添加邻近应用程序的 NDEF 库。在 Package Manager我查了 Allow NuGet to download missing packages during build并在 Solution Explorer我选择了 Enable NuGet Package Restore .

到目前为止一切顺利,但是当我尝试安装该软件包时,出现以下错误:

Could not install package 'NdefLibrary 0.9.0.1'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.



enter image description here

最佳答案

这在我的开发箱上运行良好。这是我的 NuGet 包管理器在 WP8 项目上的输出:

PM> Install-Package NdefLibrary
You are downloading NdefLibrary from Andreas Jakl, the license agreement to which is available at https://ndef.codeplex.com/license. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'NdefLibrary 0.9.0.1'.
Successfully added 'NdefLibrary 0.9.0.1' to Wp8TestApp.

您可能缺少的是将 NuGet 包管理器更新到最新版本。转到 Visual Studio 文件菜单 --> 工具 --> 扩展和更新 --> 更新 --> Visual Studio 库 --> NuGet --> 更新,最后您需要重新启动。需要此更新的原因是 VS2012 RTM 附带的 NuGet 版本不支持 WP8,因为 WP8 在 VS2012 之前没有 RTM。

关于visual-studio-2012 - 将 NuGet ndef 库添加到 Windows Phone 8 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13342630/

相关文章:

android - 如何在 Android 应用程序中永久禁用 NDEF 标签发现而不仅仅是 Activity?

visual-studio-2012 - Web Essentials 不起作用

c# - 如何在扩展管理器中卸载 Microsoft Web 开发人员工具

c# - Visual Studio 2013,运行一个通过快捷方式分隔的测试

c# - Nethereum - 方法 eth_feeHistory 不存在或不可用

asp.net-mvc - 如何让 MSBuild 使用被引用为 nuget 包的 MVC 程序集来构建我的解决方案

iOS 13 快捷方式 URL "Cannot connect to server"

c++ - 如何在 Visual Studio (C++) 中找到应用程序的入口点

nuget - 使用包还原时有没有办法自动更新 .nuget 文件夹中的 nuget.exe?

nfc - nexus mobile中的NFC可以读取普通的RFID标签吗?