Change AssemblyCulture of embedded resource DLL
-
Thursday, February 23, 2012 12:16 PM
Using VS2005 and .NET 2.0.
I have several files such as uif_strings.de.resx (German) and uif_strings.es.resx (Spanish) that are included in my project. During compilation, VS automatically creates a resource DLL from each resx file as follows:
* de\ChemLibrary.resource.dll
* es\ChemLibrary.resource.dll
and so onEach DLL has the culture (AssemblyCulture) set appropriately, for example to "de" for the German DLL and "es" for the Spanish DLL.
This is all good...but I'd like to know it is possible to:
- Get VS to automatically compile all DLLs with CultureInfo="es" and NOT "de"? [This is the key step]
- Copy the DLL to another location other than de\ChemLibrary.resources.dll, say lang\German.resource.dll? [This step is not critical - I can always
perform the required steps as a Post-Build step in VS]
- Alternatively, get VS to build the resource DLLs as normal (and create that "de" culture DLL) but modify the AssemblyCulture of the DLL in some
Post-Build step in VS or perhaps using some external script?Thanks,
Alain- Moved by Rudedog2MVP, Moderator Friday, February 24, 2012 12:00 AM custom build issue (From:Visual C# Language)
All Replies
-
Friday, February 24, 2012 9:35 AMModerator
Hi Alain,
>> Get VS to automatically compile all DLLs with CultureInfo="es" and NOT "de"? [This is the key step.
The Visual C# IDE cannot perform this function.
But you can try to record a macros to exclude and include your file. For example if you have two files, file1 and file2, and you want to compile file 1, now you can exclude your file2, then the vs will only build the file1.
You can learn from the following articles to learn how to record a macros.
How to: Record Macros : http://msdn.microsoft.com/en-us/library/7kyhdt1z(v=vs.100).aspxLucy Liu [MSFT]
MSDN Community Support | Feedback to us
- Proposed As Answer by CoolDadTxMVP, Moderator Monday, February 27, 2012 2:41 PM

