開発したアプリなど一覧

Xamarin で Microsoft.Net.Http インストール時に Could not install package 'Microsoft.Bcl.Build 1.0.14' が出た

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

Xamarin で作成したプロジェクトに Microsoft HTTP Client Libraries をインストールしようとしたところ、以下のようなエラーが出た。

Could not install package 'Microsoft.Bcl.Build 1.0.14'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', 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.

Microsoft.Net.Http が依存している Microsoft.Bcl.Build のインストールに失敗しているということのようだ。

とりあえず Microsoft.Bcl.Build を先にインストールしようとしたところ、上記エラーで表示されているものとバージョンが違う事がわかった。

現在 NuGet 上にあるものは 1.0.21, エラーメッセージ内では 1.0.14 が指定されている。

新しいほうを NuGet でインストールした後、Microsoft.Net.Http を再度 NuGet からインストールしてみると成功した。

Sponsored Link

コメント

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