-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid crashing in non-Windows environments #9
Comments
WineFedora 38 x64 Setup⛔ DO NOT install "Wine Windows Program Launcher" from the Fedora Software GUI, because that will crash with the error sudo dnf install wine winetricks
env WINEPREFIX=$HOME/winedotnet wineboot --init
env WINEPREFIX=$HOME/winedotnet wine uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}' # Keep Mono and Wine separate
env WINEPREFIX=$HOME/winedotnet winetricks --force dotnet48 corefonts Testingenv WINEPREFIX=$HOME/winedotnet wine ./darknet-demo-winforms.exe
So it looks like we just need to handle the managed exception MonoFedora 38 x64 Setupsudo dnf install mono-complete # includes mono-winforms Testingmono ./darknet-demo-winforms.exe
The older DarkNet-Forms 1 avoided this by not having any methods that referred to any WPF types at all, using conditional compilation. With DarkNet 2, consumer Forms projects still don't have to refer to I don't think this can be fixed in one assembly without using reflection instead of strong typing. Windows 7Continues to work fine, does not throw |
The Forms demo runs fine in Wine if we just catch |
See report of crashes with Wine. It is not clear what the root cause is, as there is no stack trace to show which method call fails, the error message, or what exception class it throws. Typically, catching
Win32Exception
is good enough, but it may also be a native fault in unmanaged code.It may also be smart to double-check that it doesn't crash in older Windows versions that, like Wine, don't contain the required DWM methods. I already tested this in Windows 7 before, but there may be a problem there now given the Wine crashes.
KeePass has good instructions of how to run .NET programs with Mono and Wine.
The text was updated successfully, but these errors were encountered: