Xamarin Automapper已失去pcl兼容性

Xamarin Automapper已失去pcl兼容性,xamarin,automapper,portable-class-library,automapper-4,Xamarin,Automapper,Portable Class Library,Automapper 4,我在PCL中使用Automapper已经三年了,一切都很好 但是由于版本4.2.1,当我尝试在PCL中安装它时,我得到以下错误: Could not install package 'AutoMapper 4.2.1'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarin

我在PCL中使用Automapper已经三年了,一切都很好

但是由于版本4.2.1,当我尝试在PCL中安装它时,我得到以下错误:

Could not install package 'AutoMapper 4.2.1'. 
You are trying to install this package into a project that targets
'portable-net45+win+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10',
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.
有什么新的东西我错过了吗


谢谢大家,AutoMapper 4.2.1不支持Windows Phone 8(wp80)。这里wp80是基于Silverlight的Windows Phone目标框架。因此,可移植类库项目的概要文件不兼容。查看AutoMapper 4.2.1,NuGet软件包的PCL目录为:

portable-net45+win+wpa81+MonoAndroid10+Xamarin.iOS10+MonoTouch10
Xamarin和Mono框架是可选的,因此PCL配置文件基本上是:

net45+win+wpa81
这是一个支持.NET 4.5、Windows 8和Windows Phone应用程序8.1的配置文件。这里wpa81是基于WinRT的Windows Phone目标框架。此PCL配置文件似乎是配置文件111

因此,为了使用AutoMapper 4.2.1,您需要更改PCL项目的配置文件。您当前的个人资料似乎是Profile78。如果切换到Profile111或其他兼容的配置文件,则应该能够安装AutoMapper 4.2.1

或者,您可以使用旧版本的AutoMapper。AutoMapper 4.1.0目标:

net45+win+wpa81+wp8+MonoAndroid10+Xamarin.iOS10+MonoTouch10

它支持Profile78。因此,最新的AutoMapper似乎已经放弃了对Windows Phone 8(Silverlight)的支持。

AutoMapper 4.2.1不支持Windows Phone 8(wp80)。这里wp80是基于Silverlight的Windows Phone目标框架。因此,可移植类库项目的概要文件不兼容。查看AutoMapper 4.2.1,NuGet软件包的PCL目录为:

portable-net45+win+wpa81+MonoAndroid10+Xamarin.iOS10+MonoTouch10
Xamarin和Mono框架是可选的,因此PCL配置文件基本上是:

net45+win+wpa81
这是一个支持.NET 4.5、Windows 8和Windows Phone应用程序8.1的配置文件。这里wpa81是基于WinRT的Windows Phone目标框架。此PCL配置文件似乎是配置文件111

因此,为了使用AutoMapper 4.2.1,您需要更改PCL项目的配置文件。您当前的个人资料似乎是Profile78。如果切换到Profile111或其他兼容的配置文件,则应该能够安装AutoMapper 4.2.1

或者,您可以使用旧版本的AutoMapper。AutoMapper 4.1.0目标:

net45+win+wpa81+wp8+MonoAndroid10+Xamarin.iOS10+MonoTouch10

它支持Profile78。看来最新的AutoMapper已经放弃了对Windows Phone 8(Silverlight)的支持。

谢谢Matt,我是否能够使用profile 111开发最近推出的Universal Windows应用程序?Universal Windows应用程序有一个uwp的NuGet目标框架,而AutoMapper在其NuGet软件包中没有该框架,因为NuGet 3将使用dotnet5.1目录中的程序集。因此,UWP应用程序将没有PCL配置文件。您可以从UWP项目中引用配置文件为111的PCL项目。谢谢Matt,我是否能够使用profile 111开发最近推出的Universal Windows应用程序?Universal Windows应用程序有一个uwp的NuGet目标框架,而AutoMapper在其NuGet软件包中没有该框架,因为NuGet 3将使用dotnet5.1目录中的程序集。因此,UWP应用程序将没有PCL配置文件。您可以从UWP项目中引用配置文件为111的PCL项目。