我正在尝试检测是否安装了 net core 3.1 Windows 桌面应用程序运行时,如果安装了则不运行安装程序。
然而,在安装了 net core 3.1 windows 桌面应用程序运行时的测试系统上,我可以看到安装程序正在运行,并且在查看日志后,NetCoreInstalled 的计算结果为 0,即使该目录存在。我怎样才能让它工作?
<Fragment>
<util:FileSearch
Id="NetCoreInstalled"
Variable="NetCoreInstalled"
Path="[ProgramFiles64Folder]dotnet\shared\Microsoft.WindowsDesktop.App\3.1.0"
Result="exists" />
<PackageGroup Id="NetCore310x64">
<ExePackage
Id="NetCore310x64"
Cache="no"
Compressed="yes"
PerMachine="yes"
InstallCondition="(VersionNT64) AND (NOT NetCoreInstalled)"
DetectCondition="NetCoreInstalled"
InstallCommand="/quiet /passive"
Vital="yes"
Permanent="yes"
SourceFile="..\..\..\Requirements\windowsdesktop-runtime-3.1.0-win-x64.exe"
Name="Redist\windowsdesktop-runtime-3.1.0-win-x64.exe" />
</PackageGroup>
</Fragment>
最佳答案
您需要DirectorySearch
,而不是FileSearch
。
关于wix - 如何检测net core 3.1 windows desktop app runtime是否安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59365880/