Microsoft.Deployment.WindowsInstaller.ProductInstallation.AllProducts .NET Core 中的替代方案
Microsoft.Deployment.WindowsInstaller.ProductInstallation.AllProducts alternative in .NET Core
我们使用 ProductInstallation.AllProducts
检查产品是否安装在 Windows:
public static bool isProductInstalled(string productCode) {
ProductInstallation instProd = ProductInstallation.AllProducts.FirstOrDefault(p => p.ProductCode == productCode);
return (instProd != null && instProd.IsInstalled);
}
在 .NET Core 中是否有替代它的方法?
您可以继续在 Windows 上将 DTF 库与 .NET Core 一起使用。
我们使用 ProductInstallation.AllProducts
检查产品是否安装在 Windows:
public static bool isProductInstalled(string productCode) {
ProductInstallation instProd = ProductInstallation.AllProducts.FirstOrDefault(p => p.ProductCode == productCode);
return (instProd != null && instProd.IsInstalled);
}
在 .NET Core 中是否有替代它的方法?
您可以继续在 Windows 上将 DTF 库与 .NET Core 一起使用。