【发布时间】:2014-08-01 00:12:40
【问题描述】:
我正在尝试在我的 Windows Phone 8.1 项目 (Visual Studio 2013) 上安装 MvvmLight,但不断收到此错误消息:
安装包:无法安装包“Portable.MvvmLightLibs 4.4.32.1”。您正在尝试将此包安装到以“WindowsPhoneApp,Version=v8.1”为目标的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件。如需更多信息,请联系包作者。
包状态的描述:
MVVM Light Toolkit 是一组组件,可帮助人们在 Silverlight、WPF、Windows Phone、Windows Store 和 Xamarin Android 中开始使用模型-视图-视图模型模式。它是一个轻量且实用的框架,仅包含所需的基本组件。此版本包含适用于 WPF4.5、Windows 8 和 8.1、Windows Phone 8.1 和 Xamarin Android 的可移植库!
什么给了?作为背景,我之前安装了 MVVM Light 包(4.2.30.0)并卸载它,因为它没有添加任何引用。它保留了 View Model 定位器。
【问题讨论】:
-
首先,那是什么应用程序? Windows Phone RT 还是 Windows Phone 8.1 SilverLight?
-
其实是一个Windows Phone 8.1 Store App。它出现在 Visual C# -> Store Apps -> Windows Phone Apps -> Blank App (Windows Phone) 下的新项目中。但是,当面向 8.1 时,Blank App (Windows Phone Silverlight) 也不起作用。
标签: c# mvvm-light windows-phone-8.1