[Bug]: Running software requiring dotnet40+ wouldn't work, because the way Bottles handles dotnet40+ seems to be broken. I also can't fully uninstall all components of Wine mono on Bottles, which would have otherwise been the workaround.
Describe the bug
As a preface, I never had these issues when I was installing osu! on Bottles last year with dotnet48, and that the install script for Lutris worked perfectly fine despite also installing dotnet48 before installing osu!.
It's worth noting that the game ran fine when importing Lutris' osu! Wine prefix, and that there was much more CPU and network utilization when the Lutris install script was installing dotnet48; this could mean Lutris, which uses Winetricks, was installing dotnet48 correctly while Bottles wasn't.
I was trying to install osu! on Bottles the way I usually did by first installing the dotnet48 dependency before running the osu!install.exe. But the installer wouldn't finish installing all the files, so I deleted the Bottle and made a new one to try installing it without any installing dotnet first this time. This worked, but I got these errors when trying to run osu!.exe after the installation finished:
002c:err:wineboot:process_run_key Error running cmd L"C:\windows\system32\winemenubuilder.exe -a -r" (126).
- Assertion at /var/hostdir/mono/mono/utils/mono-error.c:647, condition `error_code != MONO_ERROR_CLEANUP_CALLED_SENTINEL' not met
0174:err:mscoree:RuntimeHost_Invoke Method System.Environment:Exit raised an exception, hr=80004002 0174:err:mscoree:RuntimeHost_ExitProcess Process should have exited 0174:err:mscoree:expect_no_runtimes Process exited with a Mono runtime loaded.
After installing dotnet48 (which also installs dotnet40), osu! still wouldn't launch, with the terminal giving me these errors, despite having the desired dotnet version installed:
002c:err:wineboot:process_run_key Error running cmd L"C:\windows\system32\winemenubuilder.exe -a -r" (126). 0080:err:module:import_dll Library mscoree.dll (which is needed by L"C:\windows\Microsoft.NET\Framework64\v4.0.30319\mscorsvw.exe") not found 0080:err:module:loader_init Importing dlls for L"C:\windows\Microsoft.NET\Framework64\v4.0.30319\mscorsvw.exe" failed, status c0000135 003c:err:service:process_send_start_message service L"clr_optimization_v4.0.30319_64" failed to start 00a0:err:module:import_dll Library mscoree.dll (which is needed by L"C:\windows\Microsoft.NET\Framework\v4.0.30319\mscorsvw.exe") not found 00a0:err:module:loader_init Importing dlls for L"C:\windows\Microsoft.NET\Framework\v4.0.30319\mscorsvw.exe" failed, status c0000135 003c:err:service:process_send_start_message service L"clr_optimization_v4.0.30319_32" failed to start 0024:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"osu!.exe" cannot be loaded 0024:err:module:loader_init Importing dlls for L"C:\osu!\osu!.exe" failed, status c0000135
I tried uninstalling Wine mono from the dependencies menu, but that would just give me the same errors as above. When I uninstalled Wine mono via Wine uninstaller, I would get an error saying Wine mono isn't installed, but when I reinstalled it through Dependencies, this is the output:
002c:err:wineboot:process_run_key Error running cmd L"C:\windows\system32\winemenubuilder.exe -a -r" (126).
Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Uri' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.UriParser' threw an exception. ---> System.MissingMethodException: Method not found: bool System.Runtime.Versioning.BinaryCompatibility.get_TargetsAtLeast_Desktop_V4_5() --- End of inner exception stack trace --- at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr) at System.Uri..cctor () [0x00117] in
:0 --- End of inner exception stack trace --- at System.Windows.Forms.Application.get_ExecutablePath () [0x0003a] in <5a2688152ce643ada3dc4e91efa0f623>:0 at #=zSQXahb4jQgps2q6YYg==.#=zlAbgB$oN$lBR () [0x00009] in <3d8fde4297d24c10d3cf94b6afd1d924>:0 at #=zSQXahb4jQgps2q6YYg==.#=zbhebV9s= () [0x0000a] in <3d8fde4297d24c10d3cf94b6afd1d924>:0 at #=zYs$0nXQXxomsxNUc7oBmhUXkK4h4.#=ziKyHUxc= () [0x00000] in <3d8fde4297d24c10d3cf94b6afd1d924>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Uri' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.UriParser' threw an exception. ---> System.MissingMethodException: Method not found: bool System.Runtime.Versioning.BinaryCompatibility.get_TargetsAtLeast_Desktop_V4_5() --- End of inner exception stack trace --- at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr) at System.Uri..cctor () [0x00117] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Application.get_ExecutablePath () [0x0003a] in <5a2688152ce643ada3dc4e91efa0f623>:0 at #=zSQXahb4jQgps2q6YYg==.#=zlAbgB$oN$lBR () [0x00009] in <3d8fde4297d24c10d3cf94b6afd1d924>:0 at #=zSQXahb4jQgps2q6YYg==.#=zbhebV9s= () [0x0000a] in <3d8fde4297d24c10d3cf94b6afd1d924>:0
To Reproduce
- Create a gaming Bottle that uses WineGE or Kron4ek. It really doesn't matter since my testing showed this happens regardless of configuration.
- Install dotnet40 or higher.
- Run or install software that requires dotnet40 to dotnet481 with the terminal.
Package
Flatpak from Flathub
Distribution
Mint 22.1
Debugging Information
Official Package: true
Version: '51.21'
DE/WM: cinnamon
Display:
X.org: true
X.org (port): :0
Wayland: false
Graphics:
vendors:
nvidia: &id002
vendor: nvidia
envs:
__NV_PRIME_RENDER_OFFLOAD: '1'
__GLX_VENDOR_LIBRARY_NAME: nvidia
__VK_LAYER_NV_optimus: NVIDIA_only
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json
nvngx_path: /usr/lib/x86_64-linux-gnu/GL/nvidia-550-120/extra/nvidia/wine
intel: &id001
vendor: intel
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/intel_hasvk_icd.x86_64.json:/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/intel_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/intel_icd.i686.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/intel_hasvk_icd.i686.json
prime:
integrated: *id001
discrete: *id002
Kernel:
Type: Linux
Version: 6.11.0-21-generic
Disk:
Total: 33557622784
Free: 33557434368
RAM:
MemTotal: 62.5GiB
MemAvailable: 55.4GiB
Bottles_envs: null
Troubleshooting Logs
Additional context
No response
After further testing, I found that I can't uninstall all components of Wine mono with Bottle's Dependency menu or legacy Wine tools, but I can do it if I use a Wine manager that uses Winetricks, such as Lutris and Heroic Games Launcher.
I just tried all of this again with osu!install.exe and dotnet48 exactly like above. I can confirm that it's still broken, with Wine Mono Runtime and Wine Mono Windows Support still remaining after installing dotnet48. Even after uninstalling Wine mono via the Dependencies menu, those components preventing dotnet40-481 from installing properly are still present according to the Uninstaller in Wine Legacy Tools, and can't be uninstalled no matter what I've tried.
I'm trying to run EDHM_UI, and dotnet48 is also broken for me. While it successfully installed, it fails to launch the application. I can't even check the output properly, as it doesn't let me run the program in a terminal either, due to #3843.
I just successfully installed osu! since Wine Uninstaller now actually removes Wine Mono, allowing me to properly install dotnet48 afterwards. However, I also discovered that installing dotnet481 doesn't work, period, even after I remove Wine Mono like I did for installing dotnet48.