我正在开发一个使用MonoGame的安卓应用程序。该项目的设置如下:

当试图使用NuGet安装Farseer物理便携时,我得到以下错误:
PM> Install-Package FarseerPhysics.Portable
'FarseerPhysics.Portable 3.5.1' already installed.
Adding 'FarseerPhysics.Portable 3.5.1' to MyGameAndroid.
Install-Package : Could not install package 'FarseerPhysics.Portable 3.5.1'. You are trying to install this package into a project that targets
'MonoAndroid,Version=v2.3', 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.
At line:1 char:1
+ Install-Package FarseerPhysics.Portable
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand当我试图安装BugSense.Xamarin.Android时,也会发生这种情况。我怀疑错误的msg是不正确的,因为我能够安装相同的软件包之前在另一个项目,具有相同的设置与当前的一个。
发布于 2014-12-07 22:25:24
FarseerPhysics.Portable与MonoAndroid项目兼容。我可以将它安装到MonoAndroid项目中。
FarseerPhysics.Portable只包含一个可移植的类库。因此,如果您看到了错误:
Could not install package 'FarseerPhysics.Portable 3.5.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v2.3',但是包不包含任何与该框架兼容的程序集引用或内容文件。有关更多信息,请与包作者联系。
此错误通常是由下列一项或两项引起的:
对于1)检查在以下目录中是否有一个Xamarin.Android.xml文件:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile78\SupportedFrameworks2)检查Visual的Extensions中是否有任何NuGet更新,您可以通过选择扩展和更新从“工具”菜单打开这些更新,然后选择“更新”选项卡。
请注意,有两个FarseerPhysics便携式NuGet包可从NuGet中获得。其中一个可以安装到任何项目中,而另一个则需要安装Xamarin便携式类库配置文件。
https://stackoverflow.com/questions/27347553
复制相似问题