[Mono-dev] mkbundle + app.config
alexander.shulgin at yessoftware.com
Tue Sep 15 11:19:31 EDT 2009
Alex Shulgin wrote:
> Alex Shulgin wrote:
>> Later, then ConfigurationManager is trying to load .config file for the
>> assembly, it uses the fake name and naturally doesn't see a file named
>> data-xxx.config near the bundled assembly.
>> I don't think it's possible to make use of bundled assemblies
>> information buried in mono internals (mono/metadata/assebmbly.c).
> I mean it's not possible to use that info _from
There's also a problem with embedding machine config.
It was reported before and fixed, but now it's broken again.
The below patch is enough to resolve the problem for me.
@@ -449,10 +449,14 @@
if (String.IsNullOrEmpty (streamName))
- if (!File.Exists (streamName))
- return false;
+ // Don't check if file exists here as this will cause
+ // bundled machine config to be skipped on machines w/o
+ // mono installed.
- Stream stream = stream = system.Host.OpenStreamForRead (streamName);
+ //if (!File.Exists (streamName))
+ // return false;
+ Stream stream = system.Host.OpenStreamForRead (streamName);
using (XmlTextReader reader = new ConfigXmlTextReader (stream,
ReadConfigFile (reader, streamName);
More information about the Mono-devel-list