個人的にハマったのでメモを残します。
環境
- Mac OS 10.11.6
- Xamarin Studio Community 6.1.1 (build 15)
事象
Xamarin Studio で Forms Appのプロジェクトを作成し、NuGetでCocosSharp.PCLをインストールしようとすると、
Attempting to gather dependency information for package 'CocosSharp.PCL.Shared.1.6.2' with respect to project 'CocosSharpSample', targeting '.NETPortable,Version=v4.5,Profile=Profile259'
Attempting to resolve dependencies for package 'CocosSharp.PCL.Shared.1.6.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'CocosSharp.PCL.Shared.1.6.2'
Resolved actions to install package 'CocosSharp.PCL.Shared.1.6.2'
For adding package 'CocosSharp.PCL.Shared.1.6.2' to project 'CocosSharpSample' that targets 'portable45-net45+win8+wp8+wpa81'.
Install failed. Rolling back...
Package 'CocosSharp.PCL.Shared.1.6.2' does not exist in project 'CocosSharpSample'
Package 'CocosSharp.PCL.Shared.1.6.2' does not exist in folder '/Users/iju/Projects/CocosSharpSample/packages'
Could not install package 'CocosSharp.PCL.Shared 1.6.2'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', 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.
のエラーが発生しました。
原因
プロジェクトのTarget FrameworkにCocosSharpが対応していないものが選択されているからで、
今回は、「Windows Phone Silverlight 8」が選択されていたのが原因でした。
対応内容
なので、「Windows Phone Silverlight 8」のチェックを外し、再度インストールを実施したところ、
正常にインストールできました。
hiro128さんの個人的なメモにも記載されているように、Silverlight関連は対象から外した方が良さそうです。