MissingManifestResourceException with multiple localised Web Apps

Discussion in 'ASP .Net' started by Marc Woolfson, Apr 1, 2009.

  1. Hi,

    I have an issue with Global Resources across multiple Web Applications.

    I have one Web Application containing a set of User Controls that are
    compiled to a single assembly using a Web Deployment Project. The Web
    Application uses Global Resources to localise strings and the .resx file is
    set to be an embedded resource.

    A second Web Application references the assemblies produced when the Web
    Deployment Project is built: the 'base' DLLs from the Web Application, the
    'wrapper' DLL and the App_GlobalResources DLL. This Web Application
    implements the compiled controls and also contains its own set of Global
    Resources.

    At run time, a MissingManifestResourceException is thrown as follows:
    Could not find any resources appropriate for the specified culture or the
    neutral culture. Make sure "Resources.<Resource file from second Web
    Application>.resources" was correctly embedded or linked into assembly
    "App_GlobalResources" at compile time, or that all the satellite assemblies
    required are loadable and fully signed.

    The Visual Studio 2008 solution at
    http://www.yourfilelink.com/get.php?fid=490995 replicates the issue. You will
    need to build the Web Deployment Project before launching Default.aspx in the
    browser.

    Please can anyone advise what I am doing wrong here? I have attempted a
    number of different combinations of Resource file build actions and I have
    tried excluding the App_GlobalResources assembly from the second Web
    Application. The latter causes the same error, but as "Resources.<Resource
    file from first Web Application>.resources" instead, so I assumed that this
    reference was required by ASP.NET.

    It may be that the compiler is attempting to create an equivalent
    App_GlobalResources assembly for the second web application but fails as the
    destination file already exists. If this is the case, some kind of merging or
    alternate naming would be preferred but I have no idea how this may be
    achieved.

    Thanks in advance,

    Marc
    Marc Woolfson, Apr 1, 2009
    #1
    1. Advertising

  2. The tip at
    http://iformattable.blogspot.com/2009/02/public-global-resources.html helped
    me resolve this issue:

    1. Set the 'Custom Tool' on the .resx file to 'PublicResXFileCodeGenerator'
    2. Set the 'Custom Tool Name' on the .resx file to 'Resources'
    3. Remove reference to 'base' App_GlobalResources from 'consuming' web
    application

    Thanks Chris!

    "Marc Woolfson" wrote:

    > Hi,
    >
    > I have an issue with Global Resources across multiple Web Applications.
    >
    > I have one Web Application containing a set of User Controls that are
    > compiled to a single assembly using a Web Deployment Project. The Web
    > Application uses Global Resources to localise strings and the .resx file is
    > set to be an embedded resource.
    >
    > A second Web Application references the assemblies produced when the Web
    > Deployment Project is built: the 'base' DLLs from the Web Application, the
    > 'wrapper' DLL and the App_GlobalResources DLL. This Web Application
    > implements the compiled controls and also contains its own set of Global
    > Resources.
    >
    > At run time, a MissingManifestResourceException is thrown as follows:
    > Could not find any resources appropriate for the specified culture or the
    > neutral culture. Make sure "Resources.<Resource file from second Web
    > Application>.resources" was correctly embedded or linked into assembly
    > "App_GlobalResources" at compile time, or that all the satellite assemblies
    > required are loadable and fully signed.
    >
    > The Visual Studio 2008 solution at
    > http://www.yourfilelink.com/get.php?fid=490995 replicates the issue. You will
    > need to build the Web Deployment Project before launching Default.aspx in the
    > browser.
    >
    > Please can anyone advise what I am doing wrong here? I have attempted a
    > number of different combinations of Resource file build actions and I have
    > tried excluding the App_GlobalResources assembly from the second Web
    > Application. The latter causes the same error, but as "Resources.<Resource
    > file from first Web Application>.resources" instead, so I assumed that this
    > reference was required by ASP.NET.
    >
    > It may be that the compiler is attempting to create an equivalent
    > App_GlobalResources assembly for the second web application but fails as the
    > destination file already exists. If this is the case, some kind of merging or
    > alternate naming would be preferred but I have no idea how this may be
    > achieved.
    >
    > Thanks in advance,
    >
    > Marc
    Marc Woolfson, Apr 1, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathew George
    Replies:
    1
    Views:
    661
    Randy Charles Morin
    Sep 15, 2003
  2. buran
    Replies:
    0
    Views:
    717
    buran
    Oct 31, 2005
  3. BabuLives
    Replies:
    0
    Views:
    322
    BabuLives
    Nov 8, 2005
  4. =?Utf-8?B?TmFlZW0=?=

    How do I retrieve Localised resources for aspx page?

    =?Utf-8?B?TmFlZW0=?=, Apr 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    358
    =?Utf-8?B?TmFlZW0=?=
    Apr 26, 2006
  5. Matthew Braid

    Localised sub?

    Matthew Braid, Apr 8, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    77
    Matthew Braid
    Apr 11, 2004
Loading...

Share This Page