【发布时间】:2016-11-18 16:18:41
【问题描述】:
我正在 Xamarin PCL 中开发一个跨平台项目,我正在使用 Visual Studio 2015 V4.6 在 IOS 和 android 上进行测试。我需要在我的可移植类中包含 System.ServiceModel 以使用 WCF 服务。我无法将它包含在 Nuget 数据包中。
Could not install package 'System.ServiceModel.Primitives 4.3.0'. 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.
我尝试直接包含Right clic on References -> path->System.ServiceModel[4.0.0.0] 然后添加* 我有这个错误信息
' Severity Code Description Project File Line Suppression State
Error Can not resolve reference: /Users/ludovic/Library/Caches/Xamarin/mtbs/builds/DemoHandyLife.iOS/725fe7b4d3cb829a82e1002d425b8f86/bin/iPhoneSimulator/Debug/System.EnterpriseServices.Wrapper.dll DemoHandyLife.iOS C:\Program Files\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 696'
如果我添加 System.ServiceModel[5.0.0.0] 我有这些错误消息
Error CS0012 The type 'CookieContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
Error CS0012 The type 'CookieContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
我尝试自动添加 system.Net Version=5.0.5.0 但没有任何反应。 有人能帮我吗?提前致谢
如果您需要更多详细信息,请告诉我。 提前感谢您的帮助。
【问题讨论】:
标签: c# android wcf xamarin.ios cross-platform