VS2010: Warning on add project reference to Silverlight project from .NET project

Posted by nlawalker on Stack Overflow See other posts from Stack Overflow or by nlawalker
Published on 2010-05-07T23:15:37Z Indexed on 2010/05/07 23:18 UTC
Read the original article Hit count: 1149

Filed under:
|
|

In VS2010, Silverlight 4, .NET 4, I've got a WCF service and a Silverlight app, and Silverlight is accessing the class not with Add Service Reference but by sharing the contract. Naturally, this means I have the contract in a Silverlight class library, and the service has a project reference to that library.

Strangely, this results in a /!\ icon on the reference, and a warning:

The project 'SilverlightClassLibrary1' cannot be referenced. The referenced project is targeted to a different framework family (Silverlight)

However, the reference works fine (I can use the interface in my Silverlight app) and builds fine.

Is this a bug? My guess is yes, since the warning is lying and also goes away if you add an assembly reference instead of a project reference. I filed a bug and there's more info here as well.

© Stack Overflow or respective owner

Related posts about c#

Related posts about Silverlight