Newbie here, does C# OpenFileDialog work in Wine?

Questions about Wine on Linux
Locked
User avatar
jstateson
Newbie
Newbie
Posts: 2
Joined: Wed Dec 22, 2021 7:24 pm

Newbie here, does C# OpenFileDialog work in Wine?

Post by jstateson »

I am new to WINE and was asked to mod my C# app to run on Wine. I installed 6.02 and mono on my 64bit 18.04 system.
I cannot get past OpenFileDialog and I tried both of the following types

Code: Select all

using OpenFileDialog = Microsoft.Win32.OpenFileDialog;
using OpenFileDialog = System.Windows.Forms.OpenFileDialog
;
I also tried both dotnet 4.6 and 4.7 and am using only the 32bit version of my app.

Googling I see there might be some type of "interactive" problem with the win32.form version and wine

Make a long story short: I can either come up with my own really cheap way to get a list of files or maybe there is a way to get it to work if someone can point what I am doing wrong.

I have the correct path to the location of the files as I was able to process an xml into a tree structure on my form, but unaccountably the OpenFileDialog cannot get a list of what is in the same folder.

For what it is worth https://stateson.net/images/WineCrash_32bit_app.txt
madewokherd
Level 4
Level 4
Posts: 149
Joined: Mon Jun 02, 2008 5:03 pm

Re: Newbie here, does C# OpenFileDialog work in Wine?

Post by madewokherd »

You'll need to give it a non-empty FilterItems list.

That was fixed by https://github.com/madewokherd/winforms ... a82cb50691 which was in wine-mono 6.4.0.
User avatar
jstateson
Newbie
Newbie
Posts: 2
Joined: Wed Dec 22, 2021 7:24 pm

Re: Newbie here, does C# OpenFileDialog work in Wine?

Post by jstateson »

Thanks for responding. I will look at that.

I also found an old program of mine, built with VS2017, and it ran fine in WINE using that OpenFileDialog. I then rebuilt it using VS2019 and there was no problem so there is something wrong with my new app as it should have worked. It is not a WINE problem.
Locked