“GalaSoft”MvvmLight不能在便携式项目中找到 [英] 'GalaSoft' MvvmLight could not be found in Portable project

查看:1392
本文介绍了“GalaSoft”MvvmLight不能在便携式项目中找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我克隆了一个解决方案,它包含基于GalaSoft MvvmLight图书馆多个项目,也有两个项目便携。我已经安装了所有需要的NuGet包和引用,但我不能够建立这些便携式的项目和它的,因为所有其他项目中引用它首先建立这些便携式项目所需。
结果我得到了每个文件GalaSoft本(下同)错误使用。它是一种便携式类库项目。

I have cloned a solution, it contains multiple projects based on GalaSoft MvvmLight library, also it has two Portable Projects. I have installed all required nuget packages and references but I am not able to build these portable projects and its required to build these portable projects first because all other projects reference it.
I got this(below) error in every file GalaSoft is used. Its a Portable class library project.

错误64类型或命名空间名称'GalaSoft'找不到(是
你结果
缺少using指令或程序集引用

Error 64 The type or namespace name 'GalaSoft' could not be found (are you
missing a using directive or an assembly reference

我已经提到这个(下)便携式MvvmLight在这个库项目

I have referenced this(below) Portable MvvmLight libraries in this project

\MvvmLightLibs.4.4.32.7\lib\netcore45\GalaSoft.MvvmLight.dll
\MvvmLightLibs.4.4.32.7\lib\netcore45\GalaSoft.MvvmLight.Extras.dll

这里是该平台的目标结果

and here is the platform target

结果
,我停留在这个问题现在超过2天。另外,我已经试过检查和取消选中生成选项在配置管理器(我读它的地方),但没有工作。


I have tried cleaning and restarting visual studio. I am stuck at this issue for more than 2 days now. Also, I have tried checking and unchecking "Build" option in Configuration Manager (i have read it somewhere) but didnt work.

此外,还有其他44警告。他们都类似于以下的警告。

Also, there are other 44 warnings. All of them looks similar to below warning.

警告28主要参考GalaSoft.MvvmLight不可能是
解析结果
,因为它有一个间接的依赖框架组装
System.Linq.Expressions,版本= 4.0.0.0,文化=中立,
公钥= b03f5f7f11d50a3a,它不能在解决当前
有针对性的框架。 .NETPortable,版本V4.0 =,外形= Profile158。至
解决此问题,要么删除参考GalaSoft.MvvmLight或
重新定位您的应用程序,其中包含
System.Linq.Expressions框架版本,版本= 4.0.0.0,文化=中性,
公钥= b03f5f7f11d50a3a

Warning 28 The primary reference "GalaSoft.MvvmLight" could not be resolved
because it has an indirect dependency on the framework assembly "System.Linq.Expressions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "GalaSoft.MvvmLight" or retarget your application to a framework version which contains "System.Linq.Expressions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

编辑:
问题修订后的

Question title revised

推荐答案

所以,你的问题是,MVVM光有没有包针对您的PCL的个人资料。

So your problem is that mvvm light has no package targeting your PCL profile.

当您使用的NuGet安装MvvmLightLibs下载包你可以看到,包中包含只有一个PCL配置文件中的组件。 MVVM光支持便携式net45 + WP8 + wpa81 + netcore45 + monoandroid1 + xamarin.ios10 。但是,你的目标PCL .NETPortable,版本= V4.5,外形= Profile78
如果你wan't你的项目是兼容MVVM照亮你必须删除 SL5 目标。

When you download the package using nuget install MvvmLightLibs you can see that the package contains the assemblies for only one PCL profile. Mvvm light supports portable-net45+wp8+wpa81+netcore45+monoandroid1+xamarin.ios10. But your PCL targets .NETPortable,Version=v4.5,Profile=Profile78. If you wan’t your project to be compatible with mvvm light you have to remove the sl5 target.

这篇关于“GalaSoft”MvvmLight不能在便携式项目中找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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