Uninstall Dotnet 4.8 (.NET) Framework Problem

Questions about Wine on Linux
Locked
gcapris
Newbie
Newbie
Posts: 4
Joined: Mon Nov 02, 2020 12:39 am

Uninstall Dotnet 4.8 (.NET) Framework Problem

Post by gcapris »

Hello to all,

I'm trying to run an ancient PC game on my laptop using Ubuntu 20.04 and Wine (Staging v.5.20). I've managed to install the game using Wine and tried to run it directly and via Lutris, but nothing happened. Reading about it a bit more, I understood that .NET Framework 4.8 had to be installed as well to run the game.

By mistake, I've installed the .NET Framework 4.8 (and 4.0 automatically) using Winetricks on the Default Prefix which is x64 instead of creating another x32 bottle.

When I tried to uninstall it using wine uninstaller command, this error appeared to me:

Image

Blocking Issues: .NET Framework 4.8 cannot be uninstalled using this package. To uninstall .NET Framework 4.8 from your computer, go to Control Panel, choose Programs and Features, choose View installed updates, select Update for Microsoft Windows (KB4486153) and then choose Uninstall.

:arrow: Does anyone know how can I fully uninstall .NET Framework from this Wine Prefix without losing any other data?

Many thanks,
Bamm
Level 4
Level 4
Posts: 136
Joined: Thu May 22, 2008 3:18 am

Re: Uninstall Dotnet 4.8 (.NET) Framework Problem

Post by Bamm »

I doubt that this is possibe. Even on Windows, .NET Frameworks doesn't uninstall cleanly. It is harmless anyway to the apps installed. If you really want it clean the only way is to start from a clean wineprefix and reinstall your stuff from there, sorry. I hope I'm wrong.
gcapris
Newbie
Newbie
Posts: 4
Joined: Mon Nov 02, 2020 12:39 am

Re: Uninstall Dotnet 4.8 (.NET) Framework Problem

Post by gcapris »

Bamm wrote: Wed Nov 04, 2020 8:03 am I doubt that this is possibe. Even on Windows, .NET Frameworks doesn't uninstall cleanly. It is harmless anyway to the apps installed. If you really want it clean the only way is to start from a clean wineprefix and reinstall your stuff from there, sorry. I hope I'm wrong.
Hi, Bamm. Thanks for your reply.

Yes, I'm afraid you're right. Somehow, I've managed to uninstall it using Wine uninstaller but not completely, as you've mentioned. And it is harmless indeed.
arzeth
Newbie
Newbie
Posts: 1
Joined: Sat Apr 16, 2022 11:30 am

Re: Uninstall Dotnet 4.8 (.NET) Framework Problem

Post by arzeth »

I got rid of the exact same error with the exact same version of Dotnet by temporaily switching OS version from Windows 10 to Windows XP in winecfg. Probably the uninstaller is smart enough not to check KB4486153 on XP because KB4486153 is applicable only for Windows 10 and Windows Server 2019.

My prefix is x64, wine-tkg-staging 7.6, Arch Linux, no Lutris.

Then I updated the prefix with

Code: Select all

wineboot -u
, it said

Code: Select all

rundll32 - .NET Framework Initialization Error

Unable to find a version of the runtime to run this application.
It turned out I had very old (last modified in 2010)

Code: Select all

mscoree.dll
in

Code: Select all

$WINEPREFIX/drive_c/windows/system32
and

Code: Select all

syswow64
. I deleted them two. Then I re-ran

Code: Select all

wineboot -u
.
Then I tried to run a Dotnet app, but got

Code: Select all

011c:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"app.exe" cannot be loaded.
I tried

Code: Select all

wineticks --force forcemono
but it did nothing. Then I re-ran

Code: Select all

wineboot -u
, still nothing.

Then I

Code: Select all

rm -rf drive_c/windows/{Microsoft.NET,mono/2.0}
, then

Code: Select all

wineboot -u
again, still nothing.

Then I realized I had a symlink named "2.0" (I created it to save/deduplicate space long time ago since I use multiple prefixes) in

Code: Select all

drive_c/windows/mono/
, so I renamed it to "j", but it did not help.

So then I just deleted this

Code: Select all

mono
directory with this symlink. Then I

Code: Select all

wineboot -u
, and I can run Dotnet apps!.

Interestingly, now this prefix's

Code: Select all

$WINEPREFIX/system.reg
has 655 mentions of

Code: Select all

mscoree
, while in an another ancient highly-used daily-used prefix (that has always been using wine-mono, never msdotnet) there are only 12.
Locked