+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Embedded Template with Resource Files

Embedded Template with Resource Files

2 posts, 0 answered
  1. Shawn
    Shawn avatar
    79 posts
    Registered:
    26 Sep 2012
    05 Aug 2010
    Link to this post
    I'm having trouble utilizing resource files for embedded templates in my custom module.  I'm doing really basic stuff by it's throwing an exception.  I'm passing the name of the resource manager in my parent view and in my template I have

    <asp:Literal runat="server" Text="<%$ Resources:EditView_Description %>"></asp:Literal>

    I have a Messages resource file embedded in the dll but I'm receiving the error

    Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "[Namespace].Messages.resources" was correctly embedded or linked into assembly "[Module Name]" at compile time, or that all the satellite assemblies required are loadable and fully signed.

    I downloaded the sample Contacts and Product module and I don't see anything different that I'm doing in my project. Any ideas?
  2. Shawn
    Shawn avatar
    79 posts
    Registered:
    26 Sep 2012
    06 Aug 2010
    Link to this post
    I figured out the problem.  In the project settings I specifically set the default namespace to be different than my assembly name.

    Namespace: CustomModules
    Assembly: CustomModules.[ModuleName]

     I was hoping that all custom modules that I create could be in the same namespace.  However, sitefinity must be using the assembly name to resolve the embedded resource file.  In my case it was looking for "CustomModules.[ModuleName].Messages", which didn't exist.  I synchronized my namespace and assembly name and it works correctly.  If anyone else is creating custom modules make sure your namespace and assembly name are the same. 
2 posts, 0 answered