3

I've got an interface in a portable class library with code analysis on build enabled. When I mark it with ServceContract and OperationContract for a WCF service, it starts throwing build errors from code analysis.

Assembly reference cannot be resolved: System.ServiceModel, Version=2.0.5.0, 
 Culture=neutral, PublicKeyToken=31bf3856ad364e35, Retargetable=Yes

The library is targeting .Net 4.5 and Silverlight 5.

Am I missing something?

4

1 回答 1

0

我有同样的问题,它与编译目标有关。我有混合配置(ARM 中的一些库,Any CPU 中的一些库)。对于 PCL,任何 CPU 几乎总是最佳选择。

于 2013-02-28T15:51:20.333 回答