2016-07-12 19 views
0

XamarinフォームPCLプロジェクト(URL /ガイド/クロスプラットフォーム/ application_fundamentals/web_services /)からWCFサービスを利用するには、 Xamarinのウェブサイト上walkthrough_working_with_WCF /)XamarinフォームPCLプロジェクトにSystem.ServiceModel Nugetパッケージを追加できません

しかし、System.ServiceModel nugetパッケージを参照する時に、私は次のエラーを取得すると、パッケージがインストールされません:

Could not install package 'System.ServiceModel 1.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', 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.

私もせずに、プロファイル78を試してみました運(WCFサポートがないので、hereの説明に従ってWindows Phone 8.1を削除しました)。

PCLプロジェクトでは、hereのように異なるプロファイルを試しましたが、成功しませんでした。

はまた、私はパッケージ管理コンソールを使用してみました、同様のエラーを得た:

 PM> Install-Package -Verbose 
    cmdlet Install-Package at command pipeline position 1 
    Supply values for the following parameters: 
    Id: System.ServiceModel 
    GET ... OK 
    Attempting to gather dependency information for package 'System.ServiceModel.1.0.0' with respect to project 'Mobile\MobileCashRegister', targeting '.NETPortable,Version=v4.5,Profile=Profile7' 
    Attempting to resolve dependencies for package 'System.ServiceModel.1.0.0' with DependencyBehavior 'Lowest' 
    Resolving actions to install package 'System.ServiceModel.1.0.0' 
    Resolved actions to install package 'System.ServiceModel.1.0.0' 
    Install failed. Rolling back... 
    Package 'System.ServiceModel.1.0.0' does not exist in project 'MobileCashRegister' 
    Package 'System.ServiceModel.1.0.0' does not exist in folder 'C:\dev\DevCuddlUpSolution\packages' 
    Install-Package : Could not install package 'System.ServiceModel 1.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', 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. 
    At line:1 char:1 
    + Install-Package -Verbose 
    + ~~~~~~~~~~~~~~~~~~~~~~~~ 
     + CategoryInfo   : NotSpecified: (:) [Install-Package], Exception 
     + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand 

にはどうすれば正常にインストールするSystem.ServiceModel nugetパッケージを選択する必要がどのプロファイルを知ることができますか?

ご注意Visual Studio 2015 Professionalと最新のXamarinを使用しています。

答えて

0

System.ServiceModel 1.0.0には、どのlibフォルダにもアセンブリが含まれていません。それはNuGet.exeを含んでいるようですので、あなたはそれを使用することができません。

公式のMicrosoft NuGetパッケージでもありません。

+0

こんにちはマット、ヒントありがとうございます。私のプロジェクトを掃除してVisual Studioを再起動した後、コンパイラはいくつかの不足しているパッケージについてもう文句を言っていないようです。これは、このページの3つのナゲットパッケージなしで正しくコンパイルされます:https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/ – Christophe

関連する問題