Last post Apr 12, 2007 01:11 PM by brodskye
Mar 28, 2007 03:41 PM|brodskye|LINK
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?
Mar 29, 2007 03:26 PM|vivek_iit|LINK
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,
Mar 29, 2007 03:53 PM|brodskye|LINK
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?
Apr 04, 2007 08:23 AM|vivek_iit|LINK
Sorry for late reply, but could you confirm if you are using Web Application project model or Website Model (default in VS 2005)?
Apr 12, 2007 01:11 PM|brodskye|LINK
I believe it is a Website model. For deployment, we pre-compile the project.