1
Vote

Adding RIA service link to the project throws a build error

description

Hi,
 
I've been working the last days using your control, and looks great. The only problem that I'm having is that i need to add RIA service to the control so it can load specific info once I load the appointmentItem view. However, the problem is once I get the link set in the project properties and build the project throws the error:
 
The type or namespace name 'Resources' does not exist in the namespace 'RIADomainService.Web'
 
One thing is that I already have this RIA service already working with other silverlight project, but some how the auto-generated code inside this project can't find this namespace
 
Any ideas?

comments

dixxieonmymind wrote Sep 27, 2010 at 2:48 PM

From what it sounds like there is a problem in your project
RIADomainServices.Web. It is looking for a sub namespace named
"Resources" and cannot find it. Until I get a chance to modify the
Outlook Calendar to move to a MVVM standard what I can sudgest is
exposing a method in the OutlookScheduler.ucCalendar class to accept
an AppointmentItem and load your appointment items from your domain
service outside of the library. Then pass what you have loaded from
your domain service into the library so you can sepperate the data
access from the business logic/UI. Without having a copy of your
project I cannot tell you for certain what is causing this error
because I know the application builds without the RIA services.

Another thing to note is that this project was built on vs 2010 which
has an updated version of RIA services. All of that functionality was
moved into the DomainService library now.

What version of the Calendar Library are you using?

mmfoscar wrote Sep 27, 2010 at 4:43 PM

I am using 4.0.2.
However, during some tweaks in my DomainService I did find it was a problem having resx files with the predefined word 'Resources' so that is resolved. But once I got over this, I found that I cannot make this project be linked to the DomainService being used by the SL app. It throws the error:

error CS0115: 'AWSManagerBusinessApplication.Web.User.OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs)': no suitable method found to override

Here is a link describing the problem, but I haven't found any real solution to the problem yet.

http://forums.silverlight.net/forums/p/179637/405342.aspx

dixxieonmymind wrote Sep 27, 2010 at 11:51 PM

This is because of the namespace for the UserExtension class. The User class in UserExtensions.cs in Services project is a partial class that links with the User class from the Services.Web project. The namespaces have to be the same for both class in order for the OnPropertyChanged to work. You also have to have a "using" statement in the UserExtensions.cs class for the System.ComponentModel as well. For mine I have it setup in the UserExtensions class to be Services.Web.Models which is the same as it is for my User class is in the Services.Web project.