Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Problem with sattelite assembly generation

$
0
0

hi.

(hope this is the correct Forum; i was forwarded here from the moderator Forum...)

I have a managed (vc2010) c++ project (named 'constants'), that contains strings in a "strings.resx" file. In the same directory where the strings.resx is located, i have another "strings.en-us.resx" which contains the same strings, translated into english.

Now, when i build the project (debug build), i get the files "constants.strings.resources", "constants.strings.en-us.rsources", the "constants.dll" assembly as well as a "en-us/constants.resources..dll". However, the"en-us/constants.resources.dll" does _not_ contain the localized strings. infact, it is actually empty (only 4 k in size). as of this, at runtime, i don't get to see the translated strings from this assembly but the one from the locale-invariant assembly.

(all of the translation stuff works with my c# assemblies: only the c++ one doesn't work.)

when i turn on the "diagnostic" logging for msbuild in the IDE, i get (a lot of stuff and) this:

-----------------------------
1>  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\AL.exe /culture:en-us /out:Debug\en-us\kernel.managed.constants.resources.dll /template:Debug\kernel.managed.constants.dll /embed:Debug\kernel.managed.constants.strings.en-us.resources
1>  Microsoft (R) Assembly Linker Version 10.0.30319.1
----------------------------

to me this appears to be the correct way to do this; however, the resulting dll is not correct.

When i run the same command from the visual Studio command line, the correct assembly containing the translations gets created.

after some digging into the loggile for the build, it appears that, when doing the build inside of vs, it will copy the satellite assembly of a referenced Project to the en-us Directory, thus overwriting (?) the correct assembly. i.o.w.: i have the assembly"Framework.stuff" referenced, and in the ide build, it copies "Framework.stuff.resources" and overwrites "kernel.managed.constants.resources". when i turn off "copy local" for that reference, that Problem doesn't appear anymore, however, this, to me, seems like a Problem with the "copy local" Option - because the copy doesn't use the correct Name for the target...

What am i doing wrong ?

(sorry for funny capitalization and spelling. for unknown reasons, the latest Version of ie is doing this to me:   http://social.microsoft.com/Forums/en-US/1e0215d1-da68-4a5b-a2cd-2dbf34029c67/cant-really-post-to-the-forums )

WM_THXADVANCE
-thomas woelfer


http://www.die.de/blog


Viewing all articles
Browse latest Browse all 15302

Trending Articles