###前提・実現したいこと
Visual Studio 2015 + Xamarinを使ってXamarin.Formsのプロジェクトを作成し、Reactive Extensionsを使えるようにしたいです。
以下の手順で作業したところ、Androidプロジェクトのビルドでエラーになりました。
- Xamarin.Forms Portableプロジェクト作成
- WindowsとWinPhoneは不要なので削除
- NuGetからSystem.ReactiveをPCL、Droid、iOS、UWPのプロジェクトに追加
この状態で、Androidのプロジェクトを選んでビルドすると次のエラーが発生しました。
なお、UWPプロジェクトのビルドは問題ありません。
iOSは手元に環境がないので試していません。
なにか、ほかの設定も必要なのでしょうか?
###発生している問題・エラーメッセージ
エラー CS1703 ID が同一の複数のアセンブリ ('C:\Users\xxxxx\Desktop\App1\packages\System.Runtime.InteropServices.WindowsRuntime.4.0.1\lib\netstandard1.3\System.Runtime.InteropServices.WindowsRuntime.dll' と 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.InteropServices.WindowsRuntime.dll') がインポートされました。重複している参照の一方を削除します。
###補足情報
そのほか、エラーではなく警告ですが、プロジェクトを作成しただけの状態でAndroidをビルドしても、以下のようなMSB3247の警告が出ました。
2> App1.Droid -> C:\Users\xxxxx\Desktop\App1\App1\App1.Droid\bin\Debug\App1.Droid.dll 2> "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" と "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" の間の競合を解決する方法がありません。一時的に、"System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" を選択します。 2> 競合を解決して警告を消去するために、app.config でアセンブリ "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" をバージョン "4.0.0.0" [C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll] からバージョン "4.1.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll] にマップし直してください。 ... 2>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2113,3): warning MSB3247: 同じ依存アセンブリの異なるバージョン間で競合が見つかりました。Visual Studio では、この警告をダブルクリックする (または選択して Enter キーを押す) ことで、この競合を修正できます。または、アプリケーション構成ファイル内の "runtime" ノードに、次のバインド リダイレクトを追加します: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.RegularExpressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft ...

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/09/21 15:08
2016/09/22 00:55