0
votes

I have had two projects: one is a Silverlight 3 application and the other is a .NET 3.5 Web application with WCF services. Now I have changed the type of my Silverlight 3 app to Silverlight 4 and specified my Web application as WCF RIA Service link in Silverlight 4 app.

And now when I build my projects I get an error:

The type or namespace name 'DomainServices' does not exist in the namespace System.ServiceModel' (are you missing an assembly reference?)

How can I resolve this problem?

1

1 Answers

2
votes

I would expect to see this if you did not add references to the RIA Services libraries on the server. Typically the two you will want are.

  • System.ServiceModel.DomainServices.Hosting.dll
  • System.ServiceModel.DomainServices.Server.dll

Also, an easy way to get the RIA pieces all set up for you is to create a new default DomainService using the item template. Right click on your web project, add new item, select new DomainService, use the default options, and select ok. It will add the assembly references as well as make a few web.config changes that are necessary to get RIA running.