Hello,

I think this is a Monobjc issue, because the name of the satellite
assemblies is mis-generated during the assembly phase. I have already make
some corrections to handle assembly name with space, but I have missed the
satellite case.

I will try to give it a try this week-end.

Regards, Laurent Etiemble.

2009/12/18 Kenny Clement <psyki...@gmail.com>

> Hi,
>
> I'm not too sure this belongs on the MonobjC mailing list, as this seems
> more of a problem/shortcoming in mkbundle, but I am using the NAnt.Monobjc
> tasks, so,
> and I am looking for a solution for my MonobjC app, so here goes:
>
> One of the more standard ways of localizing Applications, is by using
> resource files (.resx) for getting strings out of it.
> Let's say we have an application that uses strings from Resource.resx
> If you then copy Resource.resx to Resource.nl-BE.resx
> and set the thread's CurrentCUlture/CurrentUICulture to nl-BE the string
> you requested will be from the Resource.nl-BE.resx file.
>
> If Visual studio, or even Mono compiles this, it creates 'Satellite
> assemblies': 1 for each language you have the resx file in.
> I assume .NET then automagically loads these through Reflection.
>
> This works with Mono.
> However, when I deploy to my customers, I don't want them to install the
> (patched) Mono Framework, I use mkbundle.
>
> However, with mkBundle, it seems to be impossible to include more than 1 of
> these satellite assemblies.
> As I need (currently) 3 languages, this is a bit of a problem.
>
> I've created a sample application to show the problem a little clearer.
> It's a console application, that requests you what culture you want to
> load, and then displays a localized string from the resource file.
>
> There's a nant.build file in the sample, with 3 targets:
> clean (cleans up the ./bin and ./dist folder)
> build (builds the app in ./bin)
> bundle (builds the app in ./bin + uses mkbundle to create a bundle in
> ./dist)
>
> nant clean build
>  - works as expected. execute the app with
> mono bin/ConsoleApp.exe
>
> nant clean bundle
> - Does not work in the current version, gives the output you can see below.
> To make it work, you can comment 2 lines, as described in the file, but then
> you will only support 1 language
>
> Is this a bug?
> Is this simply impossible?
> Is there some sort of workaround available?
>
> Thanks in advance,
>
>
>
> - Kenny
>
>
>
> mkbundle output:
>
> ...........
>  [mkbundle]   Reference added
> 'file:///Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll'
>  [mkbundle]   Reference added
> 'file:///Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/Mono.Security/2.0.0.0__0738eb9f132ed756/Mono.Security.dll'
>  [mkbundle] Getting references for additional libraries
>  [mkbundle]   Reference added
> 'file:///Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/nl-BE/ConsoleApp.resources.dll'
>  [mkbundle]   Reference added
> 'file:///Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/fr-FR/ConsoleApp.resources.dll'
>  [mkbundle]   Reference added
> 'file:///Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/en-US/ConsoleApp.resources.dll'
>  [mkbundle] Generating native sources...
>  [mkbundle]   Embedding Assembly
> '/Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/ConsoleApp.exe'
>  [mkbundle]   Embedding Assembly
> '/Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/2.0/mscorlib.dll'
>  [mkbundle]   Embedding Assembly
> '/Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll'
>  [mkbundle]   Embedding Assembly
> '/Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll'
>  [mkbundle]   Embedding Assembly
> '/Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll'
>  [mkbundle]   Embedding Assembly
> '/Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll'
>  [mkbundle]   Embedding Assembly
> '/Library/Frameworks/Mono.framework/Versions/2.4/lib/mono/gac/Mono.Security/2.0.0.0__0738eb9f132ed756/Mono.Security.dll'
>  [mkbundle]   Embedding Assembly
> '/Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/nl-BE/ConsoleApp.resources.dll'
>  [mkbundle]   Embedding Assembly
> '/Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/fr-FR/ConsoleApp.resources.dll'
>  [mkbundle]   Embedding Assembly
> '/Users/kclement/Projects/homes/kclement/code/dotnet/Localization/bin/en-US/ConsoleApp.resources.dll'
>  [mkbundle] Source generation done in 14.67 seconds
>  [mkbundle] Compiling native sources...
>  [mkbundle]
> /Users/kclement/Projects/homes/kclement/code/dotnet/Localization/dist/ConsoleApp.s:6012998:FATAL:Symbol
> _assembly_data_ConsoleApp_resources_dll already defined.
>  [mkbundle]
> /Users/kclement/Projects/homes/kclement/code/dotnet/Localization/dist/ConsoleApp.c:22:
> error: redefinition of 'assembly_bundle_ConsoleApp_resources_dll'
>  [mkbundle]
> /Users/kclement/Projects/homes/kclement/code/dotnet/Localization/dist/ConsoleApp.c:20:
> error: previous definition of 'assembly_bundle_ConsoleApp_resources_dll' was
> here
>  [mkbundle]
> /Users/kclement/Projects/homes/kclement/code/dotnet/Localization/dist/ConsoleApp.c:24:
> error: redefinition of 'assembly_bundle_ConsoleApp_resources_dll'
>  [mkbundle]
> /Users/kclement/Projects/homes/kclement/code/dotnet/Localization/dist/ConsoleApp.c:22:
> error: previous definition of 'assembly_bundle_ConsoleApp_resources_dll' was
> here
>  [mkbundle] Compilation done in 8.41 seconds
>  [mkbundle] Collecting native libraries
> ............
>
>
>
>
>
>

Reply via email to