[Mono-dev] Configuration.HasFile returning wrong value in Mono
gregoryyoung1 at gmail.com
Fri Jun 10 12:03:22 UTC 2016
Looks like its appending the .config (note it takes an exeFile parameter).
On Fri, Jun 10, 2016 at 2:20 PM, MarLOne <InfoSeeker002 at gmail.com> wrote:
> I am using C# in Mono in Mint17 - Mono JIT compiler version 4.2.3 (Stable
> 220.127.116.11/832de4b Wed Mar 16 13:19:08 UTC 2016)
> and come across this problem picked up by my NUnit code when I am moving
> code from Windows/CLR to Mono.
> I obtain the *Configuration* object by using
> *ConfigurationManager.OpenExeConfiguration( string exePath )*. When I pass
> to it a path like this: /home/testapp/MyApp.exe.config, the method returns a
> non-null object, same as in CLR.
> However the Config.FilePath becomes /home/testapp/MyApp.exe.config.config
> which clearly is not a conventional config file name for an executable.
> File.Exists() with this path returning false, as expected.
> However, Config.HasFile returning true in Mono while it is false in CLR.
> Clearly this value should be false in view of File.Exists() returning false.
> Can someone explains why this anomaly between CLR and Mono?
> Here is my Unit test code:
> L5 fails in Mono while it does not fail in Windows/CLR. Why?
> View this message in context: http://mono.1490590.n4.nabble.com/Configuration-HasFile-returning-wrong-value-in-Mono-tp4667959.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
Studying for the Turing test
More information about the Mono-devel-list