locked
Silverilght Business Appliction, Ria and Resources RRS feed

  • Question

  • Hiya, I've been trying to extend the Business Application Template project in Silverlight 4. I've created a Domain Service with associated metadata and have referenced a resource on the Web Application in the metadata attributing just like Business Application Template does (In the template, the RegistrationData model references resources in ErrorResources and RegistrationDataResources in the attributes: e.g. [Display(Order = 3, Name = "PasswordLabel", Description = "PasswordDescription", ResourceType = typeof(RegistrationDataResources))]).

    Now I've tried to mimic this behavior for my Domain Service and have created a new Resource in my Resource directory called MyResources.resx. Strings in this resource file are referenced in exactly the same way as the Busniess Application Template.

    When I build my solution I get an error 'The type or namespace MyResources does not exist in the namespace...' Womehow the RIA generated .g.cs file has access to the Resources added by the template but not to my added resource. What's slightly confusing is that there isn't a generated class for RegistrationData or for ErrorResources on the client. How has RIA given the client access to these two classes on the Web assembly? How do I give it t my classes?

    Hope someone can help.

    Steve
    Monday, November 23, 2009 1:36 PM

Answers

  • Great, that works. Thanks so much. (BTW anyone else who's got here running VS2010 Beta 2 - if your 'Add Existing Item' function isn't working, try running in XP SP3 mode)
    Tuesday, November 24, 2009 12:47 PM

All replies

  • Please see this article I posted on Ria Service Forum:

     

    http://forums.silverlight.net/forums/t/146309.aspx

     

    The just of it is you have to create it on the Server Side, and add it in the silverlight side as a LINK and the Folder structure must match the namespace of it on the server. Read issue 1.

    Tuesday, November 24, 2009 12:16 PM
  • Great, that works. Thanks so much. (BTW anyone else who's got here running VS2010 Beta 2 - if your 'Add Existing Item' function isn't working, try running in XP SP3 mode)
    Tuesday, November 24, 2009 12:47 PM