How to replace dotnet40 with dotnet45?

I'm trying to install dotnet40 via winetricks, but I've got the following error:

$ winetricks dotnet45
Executing w_do_call dotnet45
------------------------------------------------------
error: dotnet45 conflicts with dotnet40, which is already installed.
------------------------------------------------------

How do I remove dotnet40 in order to install dotnet45 package?

I'm using wine-2.0.4 on macOS.


You can try running the wine built-in Uninstaller program. Issue from the command prompt:

$ wine uninstaller

See: https://wiki.winehq.org/Uninstaller


For me, after uninstalling from wine, still had issues with installing dotnet452. This command run in the linux terminal worked for me:

winetricks --force dotnet452