locked
[Q:] How to extend precompiled Web Application with satellite assemblies? RRS feed

  • Question

  • User2058970253 posted

    Hi there,

    In VS2005 in order to make use of GetGlobalResourceObject() I have to copy a .resx file into the folder App_GlobalResources of the VS. After the application is precompiled, the resource files are being compiled into the corresponding satellite assemblies and deployed under the \bin\ folder by culture names. This all works fine.

    However, I'm unable to add new satellite assemblies after the application has been precompiled. What I've done was:

    1. Created a satellite assembly:

    resgen resources.applicationresources.es-ES.resx resources.applicationresources.es-ES.resources
    al /t:lib /culture:es-ES /embed:resources.applicationresources.es-ES.resources /out:App_GlobalResources.resources.dll

    2. Created folder \bin\es-ES\ and deployed the .dll file there.

    Unfortunately, the newly added satellite assembly is not being recognized by the GetGlobalResourceObject(), which falls back to the default (English) resource. There seems to be nothing wrong with the resource file because if I copy the same .resx file into App_GlobalResources and then compile the application, everything works just fine.

    What am I missing?

    Thanks,

    Eli

    Wednesday, March 28, 2007 3:41 PM

All replies

  • User-503940700 posted

    Hi Eli,

    If you are using the WAP model you can try putting your resource files (resx raw files) under the App_globalResources folder after the precompilation so that the runtime will generate the relkevant satellite assembly for you. Let me know if this works.

     Hope this helps,

    Vivek
     

    Thursday, March 29, 2007 3:26 PM
  • User2058970253 posted

    Hi Vivek,

    Thanks for your suggestion. Unfortunately, after I precompile, there's no folder App_GlobalResources anymore, rather, in the \bin\ folder I get the following App_GlobalResources.dll and App_GlobalResources.compiled

    When I try to put a folder App_GlobalResources I get the error "The folder App_GlobalResources is not allowed in precompiled application."

    Any other suggestions?

    Thanks,

    Eli

    Thursday, March 29, 2007 3:53 PM
  • User-503940700 posted

    Hi Eli,

    Sorry for late reply, but could you confirm if you are using Web Application project model or Website Model (default in VS 2005)?

    Thanks,

    Vivek

    Wednesday, April 4, 2007 8:23 AM
  • User2058970253 posted

    Hi Vivek,

    I believe it is a Website model. For deployment, we pre-compile the project.

    Thanks,

    Eli

    Thursday, April 12, 2007 1:11 PM