I have created a RIA services class library project and things are not going as I expected. The problem is that when I add domain service classes to the server project, the corresponding domain context classes are not generated on the client project.
I start by creating a new project of type WCF RIA services class library. The generated solution has two projects: RIAServicesLibrary1
(the Silverlight class library project) and RIAServicesLibrary1.Web
(the class library that will hold the services).
Then I add a new project item to RIAServicesLibrary1.Web
of type DomainServiceClass. I add a sample method so that the resulting class code is:
namespace RIAServicesLibrary1.Web
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.ServiceModel.DomainServices.Hosting;
using System.ServiceModel.DomainServices.Server;
// TODO: Create methods containing your application logic.
[EnableClientAccess()]
public class DomainService1 : DomainService
{
[Invoke]
void DoSomething()
{
}
}
}
Then I generate the whole solution and... nothing happens on the client project. The Generated_Code
folder is empty, and the domain context object for the service is not here.
Funny enough, if I add a new item of type Authentication domain service, it works as expected: the file RIAServicesLibrary1.Web.g.cs
is created on the client project, containing the AuthenticationDomainService1
class as expected.
So what's happening here? Am I doing something wrong?
Note: I am using Visual Studio 2010 Ultimate RTM and WCF RIA services 1.0.