2016-07-12 3 views
0

Xamarin Form PCL 프로젝트 (URL/guides/cross-platform/application_fundamentals/web_services /)에서 WCF 서비스를 사용하기위한 공식 xamarin 자습서를 따르려고합니다. walkthrough_working_with_WCF는 system.serviceModel의 nuget 패키지를 참조시Xamarin Form PCL 프로젝트에 System.ServiceModel Nuget 패키지를 추가 할 수 없습니다.

그러나/자 마린에 웹 사이트는), 나는 다음과 같은 오류와 패키지가 설치되지 않습니다 얻을 :

나는 또한하지 않고 프로파일 (78)을 시도

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.

WCF 지원이 없으므로 here으로 설명한 Windows Phone 8.1을 제거했습니다.

here에 설명 된대로 PCL 프로젝트에 대해 다른 프로필을 시도했지만 성공하지 못했습니다.

또한, 나는 패키지 관리 콘솔을 사용하여 시도 및 이와 유사한 오류가있어 :

 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

안녕하세요 Matt, 힌트를 보내 주셔서 감사합니다. 내 프로젝트를 청소하고 Visual Studio를 다시 시작한 후에 컴파일러가 누락 된 패키지에 대해 더 이상 불평하지 않는 것으로 보입니다. 이 페이지에서 3 가지 언급 된 nuget 패키지없이 올바르게 컴파일됩니다. https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/walkthrough_working_with_WCF/ – Christophe