34 references to MsiUtils
Microsoft.DotNet.Build.Tasks.Workloads (10)
Msi\MsiProperties.wix.cs (7)
105
InstallSize =
MsiUtils
.GetInstallSize(path),
106
Language = Convert.ToInt32(productLanguage == null ?
MsiUtils
.GetProperty(path, MsiProperty.ProductLanguage) : productLanguage),
108
ProductCode = productCode == null ?
MsiUtils
.GetProperty(path, MsiProperty.ProductCode) : productCode,
109
ProductVersion = productVersion == null ?
MsiUtils
.GetProperty(path, MsiProperty.ProductVersion) : productVersion,
110
ProviderKeyName = providerKeyName == null ?
MsiUtils
.GetProviderKeyName(path) : providerKeyName,
111
UpgradeCode = upgradeCode == null ?
MsiUtils
.GetProperty(path, MsiProperty.UpgradeCode) : upgradeCode,
112
RelatedProducts =
MsiUtils
.GetRelatedProducts(path)
Swix\MsiSwixProject.wix.cs (1)
146
msiWriter.WriteLine($" SystemDrive={
MsiUtils
.GetInstallSize(_msi.ItemSpec)}");
WorkloadManifestPackage.wix.cs (1)
82
MsiUtils
.ValidateProductVersion(MsiVersion);
WorkloadSetPackage.wix.cs (1)
56
MsiUtils
.ValidateProductVersion(MsiVersion);
Microsoft.DotNet.Build.Tasks.Workloads.Tests (24)
CreateVisualStudioWorkloadSetTests.cs (3)
53
MsiUtils
.GetAllRegistryKeys(msi.ItemSpec).Should().Contain(r =>
60
Assert.False(
MsiUtils
.HasTable(msi.ItemSpec, "Upgrade"));
63
DirectoryRow versionDir =
MsiUtils
.GetAllDirectories(msi.ItemSpec).FirstOrDefault(d => string.Equals(d.Directory, "WorkloadSetVersionDir"));
CreateVisualStudioWorkloadTests.cs (6)
81
Assert.Equal("{C4F269D9-6B65-36C5-9556-75B78EFE9EDA}",
MsiUtils
.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.UpgradeCode));
84
Assert.Equal("6.33.28",
MsiUtils
.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.ProductVersion));
85
Assert.Equal("Microsoft.NET.Workload.Emscripten,6.0.200,x64",
MsiUtils
.GetProviderKeyName(manifestMsiItem.ItemSpec));
217
Assert.Equal("{CBA7CF4A-F3C9-3B75-8F1F-0D08AF7CD7BE}",
MsiUtils
.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.UpgradeCode));
220
Assert.Equal("6.33.28",
MsiUtils
.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.ProductVersion));
221
Assert.Equal("Microsoft.NET.Workload.Emscripten,6.0.200,arm64",
MsiUtils
.GetProviderKeyName(manifestMsiItem.ItemSpec));
MsiTests.cs (15)
38
MsiUtils
.GetAllRegistryKeys(msiPath603).Should().Contain(r =>
58
Assert.NotEqual(
MsiUtils
.GetProperty(msiPath603, MsiProperty.UpgradeCode),
MsiUtils
.GetProperty(msiPath604, MsiProperty.UpgradeCode));
61
Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain,6.0.200,6.0.3,x64",
MsiUtils
.GetProviderKeyName(msiPath603));
62
Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain,6.0.200,6.0.4,x64",
MsiUtils
.GetProviderKeyName(msiPath604));
65
MsiUtils
.GetAllDirectories(msiPath603).Should().Contain(d =>
69
MsiUtils
.GetAllDirectories(msiPath604).Should().Contain(d =>
97
Assert.Equal("{E4761192-882D-38E9-A3F4-14B6C4AD12BD}",
MsiUtils
.GetProperty(msiPath, MsiProperty.UpgradeCode));
98
Assert.Equal("1.2.3",
MsiUtils
.GetProperty(msiPath, MsiProperty.ProductVersion));
99
Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain,6.0.200,x64",
MsiUtils
.GetProviderKeyName(msiPath));
103
MsiUtils
.GetAllDirectories(msiPath).Select(d => d.Directory).Should().NotContain("ManifestVersionDir");
129
Assert.Equal("{EC4D6B34-C9DE-3984-97FD-B7AC96FA536A}",
MsiUtils
.GetProperty(msiPath, MsiProperty.UpgradeCode));
131
Assert.Equal("15.2.302.0",
MsiUtils
.GetProperty(msiPath, MsiProperty.ProductVersion));
132
Assert.Equal("Microsoft.iOS.Templates,15.2.302-preview.14.122,x64",
MsiUtils
.GetProviderKeyName(msiPath));
137
FileRow fileRow =
MsiUtils
.GetAllFiles(msiPath).FirstOrDefault();