[Mono-dev] SPAM-LOW: [Patch] ConfigurationFile should be relative to the ApplicationBase

Charlie Poole charlie at nunit.com
Thu Mar 1 08:11:55 EST 2007


Hi Jamie,

Due to problems with CVS, I didn't get your last fixes into the
release candidate. They'll show up in RC2/Final, whichever is
next.

Charlie 

> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com 
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf 
> Of Jamie Cansdale
> Sent: Thursday, February 22, 2007 8:28 AM
> To: Mono Development List
> Subject: SPAM-LOW: [Mono-dev] [Patch] ConfigurationFile 
> should be relative to the ApplicationBase
> 
> I recently hit an issue with Mono not being able to find my 
> .config files. My application was developed using .NET so 
> this is a discrepancy between Mono and .NET. AFAIK this 
> behavior isn't documented anywhere.
> 
> AppDomainSetup setup = new AppDomainSetup(); 
> setup.ApplicationBase = "app_base"; setup.ConfigurationFile = 
> "blar.config";
> 
> .NET would look for the .config file at 
> 'app_base\blar.config'. Mono looks for the .config file in 
> the current directory. If the ApplicationBase isn't specified 
> in .NET a MemberAccessException is thrown when the 
> ConfigurationFile property is accessed (assuming it isn't an 
> absolute path).
> 
> I've attached patches for unit tests and a "fix" for this. 
> This is my first patch so please let me know if I'm doing it right.
> 
> Thanks, Jamie.
> 
> --
> http://www.testdriven.net
> http://weblogs.asp.net/nunitaddin
> 





More information about the Mono-devel-list mailing list