[Mono-bugs] [Bug 476354] .NET exe / binary doesn't work with Mono (System.TypeInitializationException)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Apr 28 12:39:39 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=476354

http://bugzilla.novell.com/show_bug.cgi?id=476354#c7


--- Comment #7 from Thomas Goldstein <stifu at free.fr> 2010-04-28 16:39:38 UTC ---
I had another quick look at this. As I said above, it seems like relative paths
are different depending on the way an application is run. I'm going to update
the bug report to clear that up.

I added these lines to the test case:

string path = Path.GetFullPath("mono-logo.png");

MessageBox.Show(path);

When running through MonoDevelop or through command line, this returns:

/home/username/blabla/WindowsApplication3/WindowsApplication/bin/Debug/mono-logo.png

However, when running the application by right clicking the exe and selecting
"Open with mono", then the path is:

/home/username/mono-logo.png

So it can't find the image then, hence the exception.

So, although not intuitive, is it really a bug? And if it is, I doubt it's a
WinForms one, more like a shell / openSUSE bug or something?

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list