简体   繁体   English

无法为Windows Phone 8.1应用程序项目安装MvvmLight

[英]Cannot install MvvmLight for Windows Phone 8.1 app project

I'm trying to install MvvmLight on my Windows Phone 8.1 project (Visual Studio 2013) but keep getting this error message: 我正在尝试在Windows Phone 8.1项目(Visual Studio 2013)上安装MvvmLight,但始终收到此错误消息:

Install-Package : Could not install package 'Portable.MvvmLightLibs 4.4.32.1'. Install-Package:无法安装软件包“ Portable.MvvmLightLibs 4.4.32.1”。 You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. 您正在尝试将此软件包安装到以“ WindowsPhoneApp,Version = v8.1”为目标的项目中,但是该软件包不包含任何与该框架兼容的程序集引用或内容文件。 For more information, contact the package author. 有关更多信息,请与软件包作者联系。

The description of the package states: 软件包说明如下:

The MVVM Light Toolkit is a set of components helping people to get started in the Model-View-ViewModel pattern in Silverlight, WPF, Windows Phone, Windows Store and Xamarin Android. MVVM Light Toolkit是一组组件,可以帮助人们从Silverlight,WPF,Windows Phone,Windows Store和Xamarin Android的Model-View-ViewModel模式开始使用。 It is a light and pragmatic framework that contains only the essential components needed. 它是一个轻巧而实用的框架,仅包含所需的基本组件。 This version contains the portable libraries for WPF4.5, Windows 8 and 8.1, Windows Phone 8.1 and Xamarin Android! 这个版本包含WPF4.5,Windows 8和8.1, Windows Phone 8.1和Xamarin Android的可移植库!

What gives? 是什么赋予了? As background, I previously installed the MVVM Light package (4.2.30.0) and the uninstalled it because it didn't add any references. 作为背景,我之前安装了MVVM Light软件包(4.2.30.0)并卸载了它,因为它没有添加任何引用。 It kept the View Model locators around. 它保持了View Model定位器的位置。

This happens if you are using an older version of NuGet. 如果您使用的是NuGet的旧版本,则会发生这种情况。 Once I updated NuGet, the problem went away. 更新NuGet之后,问题就消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM