Bug 2176534

Summary: wine-mono cannot run C# applications
Product: [Fedora] Fedora Reporter: Konrad Borowski <redhat>
Component: wineAssignee: Michael Cronenworth <mike>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: andreas.bierfert, besser82, master_pumpkin_, mike
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-08 23:32:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Konrad Borowski 2023-03-08 15:22:11 UTC
Description of problem:

When running any C# application with Wine I get the following error.

0218:err:module:import_dll Library iconv.dll (which is needed by L"Z:\\usr\\share\\wine\\mono\\wine-mono-7.4.0\\bin\\libmono-2.0-x86_64.dll") not found
0218:err:mscoree:load_mono Could not load Mono into this process


Version-Release number of selected component (if applicable): wine-mono-7.4.0-1.fc37.noarch


How reproducible: Always


Steps to Reproduce:
1. Download any C# application, such as run-tests.exe from https://dl.winehq.org/wine/wine-mono/7.4.0/wine-mono-7.4.0-tests.zip.
2. Extract the archive
3. Run wine run-tests.exe

Actual results:

0218:err:module:import_dll Library iconv.dll (which is needed by L"Z:\\usr\\share\\wine\\mono\\wine-mono-7.4.0\\bin\\libmono-2.0-x86_64.dll") not found
0218:err:mscoree:load_mono Could not load Mono into this process

Expected results:

Application should run.


Additional info:

Installed wine using wine meta package.

Comment 1 Michael Cronenworth 2023-03-08 23:32:26 UTC

*** This bug has been marked as a duplicate of bug 2174631 ***

Comment 2 Roger Olsson 2026-01-12 10:24:04 UTC
This issue is caused by Wine not finding MinGW libraries, which are needed for the system wine-mono to work (i.e. not a Mono installed into a Wine prefix). You need add the directory containing the needed .dll libraries to the WINEPATH environment variable:

$ env "WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin" wine yourprogram.exe

This will prepend the directory to the PATH variable inside Wine. You could add WINEPATH to your shell startup scripts, or, alternatively, Fedora's version of Wine could be patched to look in the correct directories automatically.