[Mono-list] linux, binfmts:Unexpected behavior

Daniel Lo Nigro lists at dan.cx
Thu Jan 3 09:59:34 UTC 2013


Could you just set the current directory manually with something like:

var appDirectory =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Directory.SetCurrentDirectory(appDirectory);

(not tested)


On Thu, Jan 3, 2013 at 5:02 AM, <mabra at manfbraun.de> wrote:

> Hi All !
>
> I moved over a lot of utilities from windows to linux, but starting them
> using "mono ..." is a pain and luckily, I discovered "binfmts".
>
> The execubales are started, but their expected path is just wrong.
>
>
> So, a manually given complete path, works just fine:
>
> myuser> mono /usr/share/WakeTheBox/WakeTheBox.exe hel
> AppDomain.CurrentDomain.BaseDirectory: /usr/share/WakeTheBox/
>
>
> Running via "binfmts" looks strange:
>
> myuser> WakeTheBox.exe hel
> AppDomain.CurrentDomain.BaseDirectory: /usr/sbin/
>
>
> Any idea to change this, would be really great. It is completely
> impracticable to give
> each executable a separate startfile. It looks to me, as if "binfmts" just
> run the
> executables with a wrong configured path.
>
> I am with mono 2.10.8.1 on Ubuntu 12.04.
>
> Best regards,
>
> ++mabra
>
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130103/d8fb1993/attachment.html>


More information about the Mono-list mailing list