我有一个 Windows 应用程序,开发人员告诉我,它需要两个不同版本的 .NET 才能运行,当我尝试安装其中一个时,出现错误,提示已安装更高版本。在 Windows 中,为需要它们的应用程序提供多个版本并不罕见,甚至预期如此,那么在 WINE 中如何做到这一点?可以以某种方式强制安装 .NET 吗?
尝试从命令行运行 .exe 以查看是否存在特定错误,它给出了此错误,而从桌面双击文件却没有任何反应。
don@Dev:~/.wine/drive_c/Program Files (x86)/ExpressPCBPlus$ wine ExpressPCBPlus.exe
029c:err:module:fixup_imports_ilonly mscoree.dll not found, IL-only binary L"ExpressPCBPlus.exe" cannot be loaded
029c:err:module:LdrInitializeThunk Importing dlls for L"C:\\Program Files (x86)\\ExpressPCBPlus\\ExpressPCBPlus.exe" failed, status c0000135
答案1
安装多个 .NET 版本
这是默认设置葡萄酒技巧行为
winetricks dlls list |grep dotnet
dotnet35sp1 MS .NET 3.5 SP1 (Microsoft, 2008) [downloadable]
dotnet40 MS .NET 4.0 (Microsoft, 2011) [downloadable,cached]
dotnet40_kb2468871 MS .NET 4.0 KB2468871 (Microsoft, 2011) [downloadable]
dotnet45 MS .NET 4.5 (Microsoft, 2012) [downloadable,cached]
dotnet452 MS .NET 4.5.2 (Microsoft, 2012) [downloadable,cached]
dotnet46 MS .NET 4.6 (Microsoft, 2015) [downloadable,cached]
dotnet461 MS .NET 4.6.1 (Microsoft, 2015) [downloadable,cached]
dotnet462 MS .NET 4.6.2 (Microsoft, 2016) [downloadable]
dotnet471 MS .NET 4.7.1 (Microsoft, 2017) [downloadable]
dotnet472 MS .NET 4.7.2 (Microsoft, 2018) [downloadable]
dotnet48 MS .NET 4.8 (Microsoft, 2019) [downloadable,cached]
dotnet_verifier MS .NET Verifier (Microsoft, 2016) [downloadable]
dotnetcore2 MS .NET Core Runtime 2.1 LTS (Microsoft, 2020) [downloadable]
dotnetcore3 MS .NET Core Runtime 3.1 LTS (Microsoft, 2020) [downloadable,cached]
dotnetcoredesktop3 MS .NET Core Desktop Runtime 3.1 LTS (Microsoft, 2020) [downloadable]
vjrun20 MS Visual J# 2.0 SE libraries (requires dotnet20) (Microsoft, 2007) [downloadable]
如果你要求 winetricks 安装 .Net 4.5,它将先安装 net4,然后再安装 net 4.5
# rm -rf $PWD/pfx1 && mkdir -p $PWD/pfx1 # brand new prefix
WINEARCH=win32 WINEPREFIX=$PWD/pfx1 winetricks dotnet452
目前 wine dotnet4 verb 仅适用于 win32
尝试一个全新的前缀
Winetricks 将删除单声道
如果你手动操作,你必须自己删除 mono
wine uninstaller # remove mono from there if its listed