无法为Windows Phone 8.1应用程序项目安装MvvmLight [英] Cannot install MvvmLight for Windows Phone 8.1 app project

查看:79
本文介绍了无法为Windows Phone 8.1应用程序项目安装MvvmLight的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows Phone 8.1项目(Visual Studio 2013)上安装MvvmLight,但始终收到此错误消息:

I'm trying to install MvvmLight on my Windows Phone 8.1 project (Visual Studio 2013) but keep getting this error message:

Install-Package:无法安装软件包"Portable.MvvmLightLibs 4.4.32.1".您正在尝试将此软件包安装到以"WindowsPhoneApp,Version = v8.1"为目标的项目中,但是该软件包不包含任何与该框架兼容的程序集引用或内容文件.有关更多信息,请与程序包作者联系.

Install-Package : Could not 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. For more information, contact the package author.

包装说明如下:

MVVM Light工具包是一组组件,可以帮助人们从Silverlight,WPF,Windows Phone,Windows Store和Xamarin Android的Model-View-ViewModel模式开始使用.它是一个轻巧而实用的框架,仅包含所需的基本组件.此版本包含适用于WPF4.5,Windows 8和8.1, Windows Phone 8.1 和Xamarin Android的便携式库!

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. 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!

有什么作用?作为背景,我之前安装了MVVM Light软件包(4.2.30.0)并卸载了它,因为它没有添加任何引用.它保留了View Model定位器.

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. It kept the View Model locators around.

推荐答案

如果您使用的是NuGet的旧版本,则会发生这种情况.更新NuGet后,问题就消失了.

This happens if you are using an older version of NuGet. Once I updated NuGet, the problem went away.

这篇关于无法为Windows Phone 8.1应用程序项目安装MvvmLight的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆