Skip to content

[Bug]: mscoree.dll never found, even after installing all dotnets #310

Open

Description

@differentfun

Describe the bug

It has been like a year, that with every dotnet installed, it returns always: 00d8:err:module:fixup_imports_ilonly mscoree.dll not found.
Is there a specific reason why this hasn't been fixed yet?

To Reproduce

Install whatever .net thing and try to launch it.

Package

Flatpak from Flathub

Distribution

Debian 13

Debugging Information

002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
0088:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebth": c0000135
00d8:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"Game.exe" cannot be loaded
00d8:err:module:loader_init Importing dlls for L"C:\\Game\\Game.exe" failed, status c0000135

Troubleshooting Logs

Additional context

No response

Activity

  1. raynix commented on Oct 13, 2025

    @raynix

    I added mscoree to override DLLs and that fixed this error for me.

  2. differentfun commented on Oct 13, 2025

    @differentfun
    Author

    What version of dotnet did you install and how did you set the override? As Native then builtin?

  3. raynix commented on Oct 13, 2025

    @raynix

    What version of dotnet did you install and how did you set the override? As Native then builtin?

    Actually, 2 things, 1 is to override mscoree, native then builtin; 2 is to uninstall any mono comes with wine or proton and install dotnet. The 4.8.1 worked for me.

  4. mansaliacom commented on Aug 20, 2026

    @mansaliacom

    mscoree.dll (both in system32 and syswow64) is installed by default when creating a new bottle. It is the Mono implementation. It does NOT get replaced with MS implementation when installing dotnet40, which leaves us with a mix of Mono and MS dotnet.
    I'll send a PR if I figure out a sensible fix to this

  5. krokosik commented on Aug 20, 2026

    @krokosik

    @mansaliacom that's awesome! Maybe winetricks would be a good inspiration? Their implementation works well for me

  6. mansaliacom commented on Aug 20, 2026

    @mansaliacom

    Yes, I'm figuring out the necessary steps we need to borrow from winetricks. At least now I know why dotnet40 doesn't properly uninstall Mono: there's 'Wine Mono Windows Support', 'Wine Mono Runtime' as well as 'Wine Mono', which is used by older versions of wine. All of these have to be uninstalled, as well as removing the mscoree.dll that wine brings in by itself. Not sure how I would do the latter though. There's no action for deleting files or running shell scripts

  7. mansaliacom commented on Sep 8, 2026

    @mansaliacom

    Okay it seems the dotnet installer doesn't touch dlls in C:\windows, which makes it even weirder. Removal of {system32,syswow64}/mscoree.dll prior to running the installer achieves nothing. Is running Microsoft dotnet completely borked in Bottles?

  8. netrunnereve commented on Sep 19, 2026

    @netrunnereve

    There's no action for deleting files or running shell scripts

    There is, it's the delete_dlls function https://github.com/bottlesdevs/Bottles/blob/5bd0002eed68abf8613f1a91e1198d473f759777/bottles/backend/managers/dependency.py#L298. I tried to look into this as well but like you said the installer isn't installing the dlls for some reason and I don't know why.

  9. philipzae commented on Oct 6, 2026

    @philipzae
    Contributor

    At least now I know why dotnet40 doesn't properly uninstall Mono: there's 'Wine Mono Windows Support', 'Wine Mono Runtime' as well as 'Wine Mono', which is used by older versions of wine. All of these have to be uninstalled, as well as removing the mscoree.dll that wine brings in by itself.

    I submitted bottlesdevs/Bottles#4841 to fix the problem of uninstalling multiple installers, but likely the uninstaller mechanism needs to have a more sophisticated uninstaller system similar to the install actions found under 'Steps:', which would be able to

    1. run an uninstaller
    2. delete and unregister a font
    3. delete and unregister a dll
    4. delete a file
    5. run the install actions in verse order as equivalent uninstall actions
  10. netrunnereve commented on Oct 8, 2026

    @netrunnereve

    I submitted bottlesdevs/Bottles#4841 to fix the problem of uninstalling multiple installers

    Sadly I don't think this will help here as there seems to be something fundamentally wrong with the dotnet installer causing it to not install the right dlls in the first place.

    BTW has anyone tried using winetricks to install dotnet inside the bottle to see if that works?

  11. philipzae commented on Oct 9, 2026

    @philipzae
    Contributor

    From what i see, the first problem is that part of the dot net installer is to uninstall mono, but no mono uninstaller is configured, so i created a patch for that #352 .

    The second possible problem is that the patch uninstalls 'Wine Mono Runtime', but to successfully remove all of mono, we may need to also uninstall 'Wine Mono Windows Support', which is why i filed this issue bottlesdevs/Bottles#4841 .

    10. Okay it seems the dotnet installer doesn't touch dlls in C:\windows, which makes it even weirder. Removal of {system32,syswow64}/mscoree.dll prior to running the installer achieves nothing. Is running Microsoft dotnet completely borked in Bottles?

    If i uninstall 'Wine Mono Runtime' using the uninstaller legacy tool, it will also remove 'Wine Mono Windows Support' from the list, and if i then install dotnet40, it will run successfully and overwrite mscoree.dll in system32 and syswow64.

    @mansaliacom Which dotnet version were you trying to run and on which runner?

  12. mansaliacom commented on Oct 9, 2026

    @mansaliacom

    If i uninstall 'Wine Mono Runtime' using the uninstaller legacy tool, it will also remove 'Wine Mono Windows Support' from the list, and if i then install dotnet40, it will run successfully and overwrite mscoree.dll in system32 and syswow64.

    Oh wow didn't notice that. Thanks for mentioning

    Which dotnet version were you trying to run and on which runner?

    dotnet40, default soda runner. Let me do it again, some time has passed since the last attempt

  13. mansaliacom commented on Oct 9, 2026

    @mansaliacom

    If i uninstall 'Wine Mono Runtime' using the uninstaller legacy tool, it will also remove 'Wine Mono Windows Support' from the list, and if i then install dotnet40, it will run successfully and overwrite mscoree.dll in system32 and syswow64.

    Doing these steps in a fresh bottle (Application template) results in the good old error:

    00e4:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"Gibbed.Borderlands2.SaveEdit.exe" cannot be loaded
    00e4:err:module:loader_init Importing dlls for L"C:\\SaveEditor\\Gibbed.Borderlands2.SaveEdit.exe" failed, status c0000135
    

    Try and see if this program runs in your bottle (it's WPF + .NET, performance sucks but is usable)
    https://github.com/gibbed/Gibbed.Borderlands2/releases/download/1.0.46/bl2_saveedit_1.0.46.zip

  14. philipzae commented on Oct 9, 2026

    @philipzae
    Contributor

    It ran just fine for me with a fresh Soda 11.0-10 application bottle. Here is the bottle yml file.

    Image
  15. mansaliacom commented on Oct 9, 2026

    @mansaliacom

    Well this is likely a problem on my side, since there are no relevant differences between your bottle.yml and mine.

    --- my-bottle.yml	2026-10-09 20:44:50.676984806 +0300
    +++ jays-bottle.yml	2026-10-09 18:39:38.000000000 +0300
    @@ -1,24 +1,24 @@
     Arch: win64
     CompatData: ''
    -Creation_Date: '2026-10-09 17:43:31.393459'
    +Creation_Date: '2026-10-09 18:31:47.582430'
     Custom_Path: false
    -D7VK: d7vk-v2.0
    +D7VK: ''
     DLL_Overrides: {}
    -DXVK: dxvk-3.1.1
    +DXVK: dxvk-3.1
     Environment: Application
     Environment_Variables: {}
     External_Programs:
    -    7a70152f-4169-4cb7-9150-ff4558ed3a74:
    +    2f02dd3e-e8c1-46e6-b48e-61588229b512:
             eagle_scan:
                 clean: true
    -            mtime: 1791567871
    +            mtime: 1590792544
                 size: 5470720
             executable: Gibbed.Borderlands2.SaveEdit.exe
    -        folder: /home/kefir/.var/app/com.usebottles.bottles/data/bottles/bottles/dotnet-test/drive_c/SaveEditor
    -        icon: /home/kefir/.var/app/com.usebottles.bottles/data/bottles/bottles/dotnet-test/icons/Gibbed.Borderlands2.SaveEdit.png
    -        id: 7a70152f-4169-4cb7-9150-ff4558ed3a74
    +        folder: /home/jay/.var/app/com.usebottles.bottles/data/bottles/bottles/Test-soda-app/drive_c/bl2_saveedit_1.0.46
    +        icon: /home/jay/.var/app/com.usebottles.bottles/data/bottles/bottles/Test-soda-app/icons/Gibbed.Borderlands2.SaveEdit.png
    +        id: 2f02dd3e-e8c1-46e6-b48e-61588229b512
             name: Gibbed.Borderlands2.SaveEdit
    -        path: /home/kefir/.var/app/com.usebottles.bottles/data/bottles/bottles/dotnet-test/drive_c/SaveEditor/Gibbed.Borderlands2.SaveEdit.exe
    +        path: /home/jay/.var/app/com.usebottles.bottles/data/bottles/bottles/Test-soda-app/drive_c/bl2_saveedit_1.0.46/Gibbed.Borderlands2.SaveEdit.exe
     Inherited_Environment_Variables:
     - DBUS_SESSION_BUS_ADDRESS
     - DISPLAY
    @@ -49,8 +49,8 @@ Installed_Dependencies:
     Language: sys
     LatencyFleX: latencyflex-v0.1.1
     Limit_System_Environment: true
    -NVAPI: dxvk-nvapi-v0.9.2
    -Name: dotnet-test
    +NVAPI: dxvk-nvapi-v0.9.1
    +Name: Test soda-app
     Parameters:
         adaptive_launch: false
         custom_dpi: 96
    @@ -107,7 +107,7 @@ Parameters:
         vmtouch_cache_cwd: false
         wayland: false
         winebridge: false
    -Path: dotnet-test
    +Path: Test-soda-app
     Registry_Rules: []
     Runner: soda-11.0-10
     RunnerPath: ''
    @@ -124,7 +124,7 @@ Uninstallers:
         gecko: NO_UNINSTALLER
         mono: NO_UNINSTALLER
         times32: NO_UNINSTALLER
    -Update_Date: '2026-10-09 17:44:47.760562'
    +Update_Date: '2026-10-09 18:39:33.391937'
     VKD3D: vkd3d-proton-3.0.1
     Versioning: false
     Versioning_Exclusion_Patterns: []
  16. philipzae commented on Oct 9, 2026

    @philipzae
    Contributor

    Did you uninstall Mono from the legacy uninstaller after the bottle was created?

  17. mansaliacom commented on Oct 9, 2026

    @mansaliacom

    Yea I did

  18. philipzae commented on Oct 9, 2026

    @philipzae
    Contributor

    Very strange that it wouldn't work for you and did for me.

    Try running the app in these bottle options

    1. a gaming bottle, remove mono through legacy installer, and installing dotnet40
    2. a custom bottle, and installing dotnet40
  19. netrunnereve commented on Oct 10, 2026

    @netrunnereve

    It ran just fine for me with a fresh Soda 11.0-10 application bottle

    Strangely that app isn't working for me as well with the same soda version and an app bottle and I'm getting the same error as @mansaliacom. Oh and I'm not seeing mscoree.dll getting replaced by a new version after I uninstall Wine Mono Runtime (which also removes Wine Mono Windows Support) and install dotnet40. Whether I uninstall Mono or not the dotnet installer doesn't touch mscoree.dll at all.

    Try running the app in these bottle options

    a gaming bottle, remove mono through legacy installer, and installing dotnet40
    a custom bottle, and installing dotnet40

    Nope that didn't help and unfortunately I still see the original mscoree.dll in system32.

  20. philipzae commented on Oct 10, 2026

    @philipzae
    Contributor

    Have you checked the installation logs in c\users[USER]\AppData\Local\Temp\ .

    Here are mine. Archive.zip

  21. philipzae commented on Oct 10, 2026

    @philipzae
    Contributor

    I was able to get the app running even without using the legacy uninstaller on Mono.

    Image

    Here is my bottles system info if it is useful.

    Official Package: true
    Version: '67.3'
    DE/WM: plasma
    Display:
        X.org: true
        X.org (port): :1
        Wayland: true
    Graphics:
        vendors:
            intel:
                vendor: intel
                envs:
                    DRI_PRIME: '1'
                icd: /usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/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/x86_64-linux-gnu/GL/vulkan/icd.d/intel_hasvk_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: null
            discrete: null
        Vulkan: true
    Kernel:
        Type: Linux
        Version: 6.17.0-35-generic
    Disk:
        Total: 8205201408
        Free: 8205025280
    RAM:
        MemTotal: 15.3GiB
        MemAvailable: 9.7GiB
    Bottles_envs: null
    
  22. netrunnereve commented on Oct 10, 2026

    @netrunnereve

    Okay I finally know what happened! Here's my installation log from c\users[USER]\AppData\Local\Temp\

    --- logging level: standard ---
    Error 0x80070002: Failed to open box from path: unix\home\myhomedir\.var\app\com.usebottles.bottles\data\bottles\temp\dotnet40.exe
    Error 0x80070002: Failed to open the box
    Exiting with result code: 0x80070002
    

    This is because I have the Default Z: Drive in New Bottles setting disabled and Windows can't access any of my Linux files. Once I made a new bottle with the z drive enabled dotnet actually installed properly and the mscoree dll got replaced.

    By the way Bottles always says that the dotnet40 install succeeded regardless if it's actually installed properly or not. Here's how it looks on my bad run without the z drive:

    Image

    Anyways thanks for your help and my dotnet app is running fine now 🙂.

  23. philipzae commented on Oct 10, 2026

    @philipzae
    Contributor

    Okay I finally know what happened! Here's my installation log from c\users[USER]\AppData\Local\Temp\

    Which log file name did see this error in?

    This is because I have the Default Z: Drive in New Bottles setting disabled and Windows can't access any of my Linux files. Once I made a new bottle with the z drive enabled dotnet actually installed properly and the mscoree dll got replaced.

    Does this mean that due to Bottles sandboxing, it can't access the dotnet40.exe in the bottles temp folder, unless this checkbox is enabled?

    Image

    Or did you also need to open up access in flatseal for 'all user files'.

    By the way Bottles always says that the dotnet40 install succeeded regardless if it's actually installed properly or not. Here's how it looks on my bad run without the z drive:

    Yes when Bottles runs installers, it simply reports that it ran successfully, even when it fails. bottlesdevs/Bottles#4820

    Anyways thanks for your help and my dotnet app is running fine now 🙂.

    That's great to hear.

    @mansaliacom How is your testing going?

  24. philipzae commented on Oct 10, 2026

    @philipzae
    Contributor

    So i did some testing and can confirm the issue and filed a new issue now that we've narrowed it down.
    bottlesdevs/Bottles#4875

  25. netrunnereve commented on Oct 11, 2026

    @netrunnereve

    It seems you figured it out but yeah I found the error in dd_dotnet40_decompression_log.txt and got it working by ticking the option in your screenshot. I didn't have to use flatseal.

  26. philipzae commented on Oct 11, 2026

    @philipzae
    Contributor

    I tested the Z drive option being enabled with the flatseal option disabled and it worked, so i left that out of the bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions