[Mono-osx] mkbundle and assembly config files
silver83
silver83 at gmail.com
Tue Dec 30 04:40:51 EST 2008
It seems that there still is a problem working with config files when
creating a bundled app.
Take a simple console program (TestApp.exe) with a config file next to it
(TestApp.exe.config) which only performs the following :
Console.WriteLine("value is : '" +
ConfigurationManager.AppSettings["test"] + "'");
running using mono produces :
$ mono TestApp.exe
value is : 'configValue'
running mkbundle and trying :
$mkbundle2 -o TestApp --deps TestApp.exe
[..mkbundle succeeds..]
$./TestApp
value is : ''
mkbundle2 embeds the information from the config file into the compiled
native binary, but it seems like something along the way fails while trying
to read it.
even if I prevent the config file from being "compiled" into the native
binary when using mkbundle, and try to supply it externally after the bundle
was created, it fails as well (the search path for the config does not
include the executable dir location).
doing some more debugging -
used dtruss to see where the config file is being searched for, (two
directories, one in the gac, I can supply output if needed), put the config
file there, now dtruss shows that the file is found and being read
successfully but the program still gets nothing back from the call to
AppSettings[] ....
There is definitly a bug here...
silver83 wrote:
>
> It seems that after using mkbundle2 - the bundled app doesn't find the
> configuration files of the specific assemblies it was made from.
>
> I see the following line from the mkbundle output :
>
> OS is: Darwin
> Sources: 6 Auto-dependencies: False
> [some embedding......]
> config from: /Users/yoni/Public/app/app.exe.config
>
> hinting that the configuration is treated somehow, but when executing, the
> application behaves as if it has no config files.
>
> At the end of the mkbundle2 output I see this :
> temp.c: In function ‘install_dll_config_files’:
> temp.c:33: warning: pointer targets in passing argument 2 of
> ‘mono_register_config_for_assembly’ differ in signedness
> temp.c:35: warning: pointer targets in passing argument 2 of
> ‘mono_register_config_for_assembly’ differ in signedness
>
>
> Any ideas ? Thanks in advance !
>
--
View this message in context: http://www.nabble.com/mkbundle-and-assembly-config-files-tp20406123p21214922.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list