開発したアプリなど一覧

Xamarin に CoreTweet をインストールしようとしたらエラーが出た

アフィリエイトリンクを含む場合があります

Xamarin Studio で作成したプロジェクトに NuGet から CoreTweet パッケージをインストールしようとしたところ、Could not add CoreTweet. というエラーが表示された。

Package Console を見ると以下のようなログが表示されていた。

Attempting to gather dependency information for package 'CoreTweet.0.7.2.352' with respect to project 'TestCoreTweet', targeting '.NETPortable,Version=v4.5,Profile=Profile259' Attempting to resolve dependencies for package 'CoreTweet.0.7.2.352' with DependencyBehavior 'Lowest' Resolving actions to install package 'CoreTweet.0.7.2.352' Resolved actions to install package 'CoreTweet.0.7.2.352' For adding package 'CoreTweet.0.7.2.352' to project 'TestCoreTweet' that targets 'portable45-net45+win8+wp8+wpa81'. Install failed. Rolling back... Package 'CoreTweet.0.7.2.352' does not exist in project 'TestCoreTweet' Package 'CoreTweet.0.7.2.352' does not exist in folder '/Users/ryomatsu/Projects/TestCoreTweet/packages' Could not install package 'CoreTweet 0.7.2.352'. 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.

重要なメッセージは一番最後のものだろう、このパッケージは互換性が無い、みたいな感じだろうか。

正直よくわからなかったのでググると stackoverflow にて以下のスレッドを発見した。

http://stackoverflow.com/questions/36964193/xamarin-forms-package-erorr

ざっと読んだ感じ、 Profile というのを変更すると良い事が書いてある。

Xamarin Studio で現在のプロジェクトの Profile を変更するには、プロジェクトの Options を開き、Build -> Genral にある Current Profile の欄をいじる必要がある。

標準では PCL 4.5 - Profile 259 となっていたのを PCL 4.5 - Profile 111 に変更する。そうすると、Incompatible packages found というメッセージが表示されるので、すでにインストールしてあるパッケージを Retarget する。

その後再度 NuGet から CoreTweet をインストールすると正常に追加できる。

恐らく CoreTweet が Profile 259 に対応していないのだろう。

Profile については以下を参照してほしい。わかりやすくまとまっている。

http://ytabuchi.hatenablog.com/entry/2014/12/10/174116

Sponsored Link

コメント

タイトルとURLをコピーしました