2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xamarin StudioでCocos Sharpの追加でエラーになる場合の対応

Posted at

個人的にハマったのでメモを残します。

環境

  • Mac OS 10.11.6
  • Xamarin Studio Community 6.1.1 (build 15)

事象

Xamarin Studio で Forms Appのプロジェクトを作成し、NuGetでCocosSharp.PCLをインストールしようとすると、

Screen Shot 2016-10-27 at 15.23.50.png
Screen Shot 2016-10-27 at 15.24.04.png
Screen Shot 2016-10-27 at 15.25.22.png

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」が選択されていたのが原因でした。
Screen Shot 2016-10-27 at 15.27.11.png

対応内容

なので、「Windows Phone Silverlight 8」のチェックを外し、再度インストールを実施したところ、
正常にインストールできました。
Screen Shot 2016-10-27 at 15.27.47.png

hiro128さんの個人的なメモにも記載されているように、Silverlight関連は対象から外した方が良さそうです。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?