2014-12-07 1 views
0

Xamarin Android를 사용하여 Android MonoGame 앱을 개발 중입니다. 다음과 같이이 프로젝트는 설정이다 : enter image description hereNuGet 설치 FarseerPhysics.Portable 패키지 오류

NuGet을 사용하여 휴대용 시어 물리학을 설치하려고 나는 다음과 같은 오류 얻을 : 나는 BugSense.Xamarin.Android를 설치하려고하면

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 

이도 발생합니다. 이전에 같은 패키지를 현재 다른 프로젝트에 설치할 수 있었기 때문에 오류 메시지가 잘못되었다고 생각합니다.

답변

2

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, 버전 = V2.3',하지만 패키지는 어떤 어셈블리 참조 또는 프레임 워크와 호환되는 콘텐츠 파일이 포함되어 있지 않습니다. 자세한 내용은 패키지 작성자에게 문의하십시오.

이 오류

는 일반적으로 다음 중 하나 또는 둘 모두에 의해 발생 :

  1. 자 마린 휴대용 클래스 라이브러리 프로파일이 설치되지 않습니다.
  2. NuGet Package Manager의 이전 버전은 MonoAndroid를 대상 프레임 워크로 인식하지 못하는 Visual Studio에 설치됩니다. 경우 1

) 다음 디렉토리에 Xamarin.Android.xml 파일이 있는지 확인 : 2의

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile78\SupportedFrameworks 

을) 당신은 비주얼 스튜디오의 확장 관리자에서 사용할 수있는 NuGet 업데이트가 있는지 확인하는 당신을 확장 및 업데이트를 선택하여 도구 메뉴에서 열고 업데이트 탭을 선택할 수 있습니다.

NuGet에서 제공하는 FarseerPhysics Portable NuGet 패키지가 두 가지 있습니다. 그 중 하나는 프로젝트에 설치할 수 있으며 다른 하나는 Xamarin Portable Class Library 프로파일을 설치해야합니다.