I have a Silverlight 4 RIA Services solution consisting of two projects, the first is the web host and RIA Services host web application. The second is the Silverlight client. I recently updated VS 2010 to Service Pack 1 and I suspect that has something to do with this problem, but I'm not sure. When building I am getting:
The type or namespace name 'ComplexObject' could not be found (are you missing a using directive or an assembly reference?)
This is being caused by a reference which inherits ComplexObject and exists in the RIA Host project but is dynamically added to the "generated_code" directory in the Silverlight client project when built.
ComplexObject is a member of System.ServiceModel.DomainServices.Client and that assembly, version 2.0.50727 is referenced by the Silverlight client so I'm not sure why it is complaining. It should be able to find that dependency.
Any help is appreciated. Thanks.
UPDATE: The using statements in the generated file are:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel.DomainServices;
using System.ServiceModel.DomainServices.Client;
using System.ServiceModel.DomainServices.Client.ApplicationServices;
using
RIA services generated for you in the .web.g.cs file? Isusing System.ServiceModel.DomainServices.Client
present? – ken2k