Skip to content
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

[Bug]: mscoree.dll not found even when dotnet48 installed. #2887

Open
Dandraghas opened this issue May 7, 2023 · 18 comments
Open

[Bug]: mscoree.dll not found even when dotnet48 installed. #2887

Dandraghas opened this issue May 7, 2023 · 18 comments

Comments

@Dandraghas
Copy link

Describe the bug

there was an application that requires dotnet48 to run im installed dotnet48 from bottles dependencies menu. Installation was succeded, but when i try to start application i get this:

002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -r" (2).
0024:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"REDACTED.exe" cannot be loaded
0024:err:module:LdrInitializeThunk Importing dlls for L"Z:\\run\\user\\1000\\doc\\REDACTED\\REDACTED.exe" failed, status c0000135

after investigation i found that mscoree was set to 'native (Windows)' i changed it to 'Native Then Builtin' but it didnt help now application i trying to run just dont launch at all.

To Reproduce

  1. Create Bottle
  2. Install dotnet48
  3. Run application
  4. See error

Package

Flatpak from Flathub

Distribution

Fedora 38

Debugging Information

Official Package: true
Version: '51.6'
DE/WM: plasmax11
Display:
    X.org: true
    X.org (port): :0
    Wayland: false
Graphics:
    vendors:
        nvidia:
            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:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json
            nvngx_path: /usr/lib/x86_64-linux-gnu/GL/nvidia-530-41-03/extra/nvidia/wine
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.2.14-300.fc38.x86_64
Disk:
    Total: 8328941568
    Free: 8328773632
RAM:
    MemTotal: 15.5GiB
    MemAvailable: 6.9GiB
Bottles_envs: null

Troubleshooting Logs

No response

Additional context

No response

@glu8716
Copy link

glu8716 commented May 10, 2023

I am having the same problem, not only with dotnet48 but with dotnet40 too.

@Dinhero21
Copy link

Dinhero21 commented Mar 9, 2024

Also having the same problem.

I tried installing dotnet48 and dotnet40 but Subnautica Nitrox wouldn't recognize it.

The weird thing is that (in C:/windows/) system32 and syswow64 contain mscoree.dll files.

But nothing changed when I copied from those directories to the lib directory (which fixed issues in the past) and the "main" one (the one that contains the executable).

I also tried to run winetricks dotnet48 which added a C:\\windows\\system32\\winemenubuilder.exe line to the logs that I don't remember seeing before and probably probably also broke a lot of stuff.

@Dinhero21
Copy link

Specs:

             .',;::::;,'.                dinhero21@fedora 
         .';:cccccccccccc:;,.            ---------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 39 (KDE Plasma) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: X570 Phantom Gaming 4 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 6.7.7-200.fc39.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 1 hour, 30 mins 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 3711 (rpm), 69 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: zsh 5.9 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1920x1080 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: Plasma 5.27.10 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: KWin 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   Theme: [Plasma], Breeze [GTK2/3] 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Icons: breeze-dark [Plasma], breeze-dark [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Terminal: konsole 
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal Font: MesloLGS Nerd Font Mono 10 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: AMD Ryzen 7 5800X (16) @ 3.800GHz 
:cccccccccccccccccccccccccccc:'.         GPU: NVIDIA GeForce RTX 4070 
.:cccccccccccccccccccccc:;,..            Memory: 6965MiB / 32009MiB 
  '::cccccccccccccc::;,.

(also Fedora)

@devurandom
Copy link

Same issue with Bottles 51.11 (soda-9.0-1, dxvk-2.3.1, vkd3d-proton-2.12):

0130:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"EDDI.exe" cannot be loaded
0130:err:module:loader_init Importing dlls for L"C:\\Program Files\\VoiceAttack\\Apps\\EDDI\\EDDI.exe" failed, status c0000135

I also tried to add a manual DLL override, in case the dotnet40 installer's override was ignored, to no avail:
image

Is a workaround known?

I am trying to create an installer for https://github.com/EDCD/EDDI:

diff --git a/Software/eddi.yml b/Software/eddi.yml
new file mode 100644
index 0000000..2e7594d
--- /dev/null
+++ b/Software/eddi.yml
@@ -0,0 +1,24 @@
+Name: eddi
+Description: "Companion application for Elite Dangerous"
+Grade: Bronze
+Arch: win32
+
+Dependencies:
+- dotnet48
+
+Executable:
+  name: Elite Dangerous Data Interface
+  icon: eddi.png
+  file: EDDI.exe
+  path: Users/Public/Desktop/EDDI.lnk
+
+Parameters:
+  dxvk: true
+
+Steps:
+- action: install_exe
+  file_name: EDDI-4.0.4.exe
+  url: https://github.com/EDCD/EDDI/releases/download/Release%2F4.0.4/EDDI-4.0.4.exe
+  rename: EDDI.exe
+  file_checksum: 7dd208e2e75244bf3643ecabbbda271c
+  arguments: "/VERYSILENT /MERGETASKS=desktopicon"
diff --git a/data/eddi/eddi.png b/data/eddi/eddi.png
new file mode 100644
index 0000000..335764f
Binary files /dev/null and b/data/eddi/eddi.png differ
diff --git a/index.yml b/index.yml
index 7d568e9..9c8a7cd 100644
--- a/index.yml
+++ b/index.yml
@@ -207,3 +207,11 @@ mega:
   Grade: Silver
   Category: Software
   Icon: mega.png
+
+eddi:
+  Arch: win64
+  Name: 'Elite Dangerous Data Interface'
+  Description: 'Companion application for Elite Dangerous'
+  Grade: Bronze
+  Category: Software
+  Icon: eddi.png

@devurandom
Copy link

Could this be a duplicate of #2828 ?

@Thanh9356
Copy link

Thanh9356 commented Jul 7, 2024

[Copied and pasted comment]
I dunno this much, but I think I can find a good solution for it... that is... when you're creating a bottle, Mono must not be installed.
You have to skip the Mono installation:

  • Bottle preset must be Custom.
  • Wine configuring, click to No when it asks for Mono.

I tried with osu! stable and it worked well.

@foinf
Copy link

foinf commented Aug 21, 2024

[Copied and pasted comment] I dunno this much, but I think I can find a good solution for it... that is... when you're creating a bottle, Mono must not be installed. You have to skip the Mono installation:

  • Bottle preset must be Custom.
  • Wine configuring, click to No when it asks for Mono.

I tried with osu! stable and it worked well.

I am having the same problem and this solution didn't work for me. I have triple checked that mono is not installed

Screenshot from 2024-08-21 10-24-52

The only things installed are allfonts and dotnet48 (I am trying to get WeMod to run)

@Marmaduke1st
Copy link

I'm experiencing the same issue, I'm trying to get a custom application to run built for windows that doesn't have an installer.

@mrunknown850
Copy link

Hi, I'm currently also facing the same issue. Running the application from host's command line with mono [application name].exe worked, but doing the same thing from Bottles' command line threw this exception (similar to that of OP):

0134:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"[executable name].exe" cannot be loaded
0134:err:module:loader_init Importing dlls for L"Z:\\[REDACTED]\\[executable name].exe" failed, status c0000135

I also installed both the mono and dotnet48 dependencies in Bottles.

Packages

bottles 2:51.13-1 from AUR

Distribution

Arch Linux

@DreamingCuttlefish
Copy link

DreamingCuttlefish commented Oct 11, 2024

I'm experiencing the same issue with the flatpak on multiple devices. Trying to run unity mod manager. It works fine in Lutris.

@MadByteDE
Copy link

MadByteDE commented Nov 1, 2024

I also had the fixup_imports_ilonly mscoree.dll not found error while trying to install the BSG Launcher for Escape from Tarkov.

I've tried changing runners, reinstalling dotnet40, dotnet48, setting dll overrides, nothing worked..

In the end I found that the mscoree.dll in system32 had the same size as the one in a vanilla wine prefix (~200kb), but the actual MS file was more then twice the size (~420kb) - so I figured the file apparently didn't get replaced correctly during the dotnet48 installation. I replaced the DLL using the MS dll from a known working prefix & everything started working as expected.

edit: & I've set a DLL override for mscoree to n,b.

@nPHYN1T3
Copy link

nPHYN1T3 commented Nov 12, 2024

In reference to Tarkov. Everything worked fine yesterday but today I was also getting the mscoree.dll problem. I cheesed it by changing the Windows version and reinstalling the .net48.1 then switching the win version back to 8.1. However now I get "Cannot get symbol u_charsToUChars from libicuuc."

Bottles has been changing settings behind the scenes as well. While debugging this the server would every so often complain about node.js only being compatible with Win 8.1 or Server 2003 (iirc) but I had it set to 8.1. Using winecfg via the "legacy" section of the GUI winecfg said bottles had changed it to 7. Later on things got weird again and the prefix had been silently changed to 10 while the bottles GUI still showed 8.1. Most the time though it seems to switch to Vista. The winhttp override had also been removed or wasn't showing in the bottles GUI. Something fishy going on.

@MadByteDE
Copy link

MadByteDE commented Nov 12, 2024

@nPHYN1T3 The icu issue might need a separate issue report... it's not related to mscoree.dll not getting replaced as far as I know.
Someone apparently "fixed" it by removing the icu.dll from system32... is it advisable to remove random DLLs from the prefix? probably not.. you could try to just disable it with a DLL override... Lutris seems to be unaffected by this issue.

@nPHYN1T3
Copy link

nPHYN1T3 commented Nov 12, 2024

Yeah I'm not saying it's related, just that I was able to get the mscoree error to go away with a direct download of .net 4.8.1, which then just lead to another issue heh. I ended up redoing the bottle pretty much ALL day trying to catch when settings in Bottles UI didn't sync with what was really going on. I think I finally got it but it seems like the mscoree error is a red herring to the fact something has gibbed the bottle in general. Might be a good application for the backup and config restore or snapshots stuff (neither of which I had in play).

@commiterate
Copy link

commiterate commented Nov 13, 2024

The changing Windows versions is probably due to the .NET Framework Bottles dependency manifests having switch Windows version steps.

https://github.com/bottlesdevs/dependencies/blob/0472592e9b64d52c2b67a91812422c0478acecb6/Essentials/dotnet48.yml#L12-L13

The manifest steps probably do this to work around .NET Framework Windows version compatibility.

https://en.wikipedia.org/wiki/.NET_Framework_version_history#Overview

However, I don't think any of the manifests should be doing that since it can cause a drift between what the actual Windows version is and what's visible in the bottle's settings. If the .NET Framework version isn't compatible with the bottle's Windows version, it should just fail.

The Bottles dependency manifests probably do this since winetricks does the same.

https://github.com/Winetricks/winetricks/blob/a06ea8795482d2f49a5461ab5f23e0036e38d12b/src/winetricks#L10102

That being said, I don't think the Windows version switch is what's causing the problems. I have a PR adding .NET Framework 4.8.1 to Bottles' dependencies and it neither installs .NET Framework 4.0 (not sure why the other .NET Framework 4.x manifests and winetricks do this) nor switches the Windows version.

bottlesdevs/dependencies#264

Testing that in a clean bottle still results in mscoree.dll not found failures despite both C://windows/system32/mscoree.dll and C://windows/syswow64/mscoree.dll existing. Both of those files, however, don't seem to get modified when installing any .NET Framework 4.x versions meaning they're probably not being replaced or patched by the .NET Framework installer. Deleting them then running the .NET Framework installer doesn't recreate them either.

If you manually run the .NET Framework 4.x installers, the installer will show a warning saying setup might not work correctly because the Windows Modules Installer Service isn't available.

#3086

If you ignore the warning and install, however, the installer succeeds without any errors or warnings.

My best guess is that it's just silently failing since the Windows Modules Installer Service isn't present.

@nPHYN1T3
Copy link

nPHYN1T3 commented Nov 13, 2024

As a last note the bottle I had this issue on was nearly 2 years old. The issue persisted when testing on new bottles too. I redid bottles all day until I by some odd order of things got it all working again then had to reinstall everything and set things up. The take away is something was/is potentially breaking old and new bottles alike. Worked the day before, then dead. It does "seem" as if the mscoree issue is just a symptom of a larger issue.

I know some installers will change Windows versions for compatibility at install but when I say bottles was changing things it wasn't while I was fighting .net stuff. It was after. I'd be going through things step by step and find Bottles simply wouldn't set things or would lose settings. DLL overrides, environment variables, Windows versions, audio settings. I'd have to set, unset, reset settings several times before they "took" or set them in winecfg from the legacy tools.

@Arcitec
Copy link

Arcitec commented Nov 20, 2024

@MadByteDE You are completely right. Bottles is not able to install the dotnet48 files. They do not get written to disk. mscoree.dll is the old Wine file (unmodified). mscores.dll is missing completely. Etc.

But it's probably a problem with the Proton/Wine runners we are using. I have an old bottle that has the correct files installed from 2 years ago. I ran my game in that old bottle instead, since none of my new bottles can install dotnet48.

@derlocke-ng
Copy link

Possible workaround:
Setting mscoree to n,b didn't help me. I copied mscoree.dll from a working Windows installation into system32 and syswow64. This works for Escape from Tarkov's Battlestate Game Launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests