Visual studio 为什么可以';如果我的项目目标是MonoAndroid,版本=v5.1,我是否安装Ninject 3.2.2?

Visual studio 为什么可以';如果我的项目目标是MonoAndroid,版本=v5.1,我是否安装Ninject 3.2.2?,visual-studio,xamarin,ninject,Visual Studio,Xamarin,Ninject,安装Ninject时,我从VS2015中的输出中获取此日志: Attempting to gather dependencies information for package 'Ninject.3.2.2' with respect to project 'ProjectPhoenix.Droid', targeting 'MonoAndroid,Version=v5.1' Attempting to resolve dependencies for package 'Ninject.3.2.

安装Ninject时,我从VS2015中的输出中获取此日志:

Attempting to gather dependencies information for package 'Ninject.3.2.2' with respect to project 'ProjectPhoenix.Droid', targeting 'MonoAndroid,Version=v5.1'
Attempting to resolve dependencies for package 'Ninject.3.2.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Ninject.3.2.2'
Resolved actions to install package 'Ninject.3.2.2'
Attempting to gather dependencies information for package 'Ninject.3.2.2' with respect to project 'ProjectPhoenix.iOS', targeting 'Xamarin.iOS,Version=v1.0'
Attempting to resolve dependencies for package 'Ninject.3.2.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Ninject.3.2.2'
Resolved actions to install package 'Ninject.3.2.2'
For adding package 'Ninject.3.2.2' to project 'ProjectPhoenix.Droid' that targets 'monoandroid51'.
Install failed. Rolling back...
Package 'Ninject 3.2.2.0' does not exist in project 'ProjectPhoenix.Droid'
Could not install package 'Ninject 3.2.2'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v5.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.
========== Finished ==========

我正在研究Xamarin,同一个项目在Xamarin Studio和Visual Studio 2015的其他实例上运行得很好,因此我知道这不是代码问题,而是我的配置问题。

我相信您的问题在这里的另一个so问题中得到了回答:

Ninject需要特定于平台的代码才能在每个Xamarin平台上工作,因此,对于Xamarin项目,我建议您使用Ninject.Portable NuGet包,而不是普通的Ninject包。您还需要在Droid、iOS、Tests和UITests项目中安装NuGet,以便能够编译所有解决方案

致意