You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: mscoree.dll never found, even after installing all dotnets #310
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
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.
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
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
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?
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
run an uninstaller
delete and unregister a font
delete and unregister a dll
delete a file
run the install actions in verse order as equivalent uninstall actions
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?
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?
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
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
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.
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:
Anyways thanks for your help and my dotnet app is running fine now 🙂.
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?
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 🙂.
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.
Activity
raynix commentedon Oct 13, 2025
I added
mscoreeto override DLLs and that fixed this error for me.differentfun commentedon Oct 13, 2025
What version of dotnet did you install and how did you set the override? As Native then builtin?
raynix commentedon Oct 13, 2025
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.
mansaliacom commentedon Aug 20, 2026
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
krokosik commentedon Aug 20, 2026
@mansaliacom that's awesome! Maybe winetricks would be a good inspiration? Their implementation works well for me
mansaliacom commentedon Aug 20, 2026
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
mansaliacom commentedon Sep 8, 2026
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?
netrunnereve commentedon Sep 19, 2026
There is, it's the
delete_dllsfunction 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.philipzae commentedon Oct 6, 2026
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
netrunnereve commentedon Oct 8, 2026
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?
philipzae commentedon Oct 9, 2026
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 .
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?
mansaliacom commentedon Oct 9, 2026
Oh wow didn't notice that. Thanks for mentioning
dotnet40, default soda runner. Let me do it again, some time has passed since the last attempt
mansaliacom commentedon Oct 9, 2026
Doing these steps in a fresh bottle (Application template) results in the good old error:
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
philipzae commentedon Oct 9, 2026
It ran just fine for me with a fresh Soda 11.0-10 application bottle. Here is the bottle yml file.
mansaliacom commentedon Oct 9, 2026
Well this is likely a problem on my side, since there are no relevant differences between your bottle.yml and mine.
philipzae commentedon Oct 9, 2026
Did you uninstall Mono from the legacy uninstaller after the bottle was created?
mansaliacom commentedon Oct 9, 2026
Yea I did
philipzae commentedon Oct 9, 2026
Very strange that it wouldn't work for you and did for me.
Try running the app in these bottle options
netrunnereve commentedon Oct 10, 2026
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.
Nope that didn't help and unfortunately I still see the original mscoree.dll in system32.
philipzae commentedon Oct 10, 2026
Have you checked the installation logs in c\users[USER]\AppData\Local\Temp\ .
Here are mine. Archive.zip
philipzae commentedon Oct 10, 2026
I was able to get the app running even without using the legacy uninstaller on Mono.
Here is my bottles system info if it is useful.
netrunnereve commentedon Oct 10, 2026
Okay I finally know what happened! Here's my installation log from c\users[USER]\AppData\Local\Temp\
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:
Anyways thanks for your help and my dotnet app is running fine now 🙂.
philipzae commentedon Oct 10, 2026
Which log file name did see this error in?
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?
Or did you also need to open up access in flatseal for 'all user files'.
Yes when Bottles runs installers, it simply reports that it ran successfully, even when it fails. bottlesdevs/Bottles#4820
That's great to hear.
@mansaliacom How is your testing going?
philipzae commentedon Oct 10, 2026
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
netrunnereve commentedon Oct 11, 2026
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.
philipzae commentedon Oct 11, 2026
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.