Skip to content

Commit 519ac7b

Browse files
committed
Merge branch 'main' into winui
# Conflicts: # build/build.cake
2 parents d876ef7 + 935875a commit 519ac7b

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

build/Find-WindowsSDKVersions.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ function Test-RegistryPathAndValue {
8282
catch {
8383
}
8484

85+
try {
86+
$path = $path -replace "HKLM:\\SOFTWARE\\", "HKLM:\\SOFTWARE\\WOW6432Node\\"
87+
if (Test-Path $path) {
88+
Get-ItemProperty -Path $path | Select-Object -ExpandProperty $value -ErrorAction Stop | Out-Null
89+
return $true
90+
}
91+
}
92+
catch {
93+
}
94+
8595
return $false
8696
}
8797

@@ -100,6 +110,11 @@ function Test-InstallWindowsSdk([string] $WindowsSDKVersion) {
100110
if (Test-RegistryPathAndValue -Path $WindowsSDKInstalledRegPath -Value "$WindowsSDKOptions") {
101111
# It appears we have what we need. Double check the disk
102112
$sdkRoot = Get-ItemProperty -Path $WindowsSDKRegPath | Select-Object -ExpandProperty $WindowsSDKRegRootKey
113+
if (!$sdkRoot) {
114+
$WindowsSDKRegPath = $WindowsSDKRegPath -replace "HKLM:\\SOFTWARE\\", "HKLM:\\SOFTWARE\\WOW6432Node\\"
115+
$sdkRoot = Get-ItemProperty -Path $WindowsSDKRegPath | Select-Object -ExpandProperty $WindowsSDKRegRootKey
116+
}
117+
103118
if ($sdkRoot) {
104119
if (Test-Path $sdkRoot) {
105120
$refPath = Join-Path $sdkRoot "References\$WindowsSDKVersion"

build/build.cake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ using System.Text.RegularExpressions;
1616
//////////////////////////////////////////////////////////////////////
1717

1818
var target = Argument("target", "Default");
19+
var configuration = Argument("configuration", "Release");
1920

2021
//////////////////////////////////////////////////////////////////////
2122
// VERSIONS
@@ -35,7 +36,7 @@ var toolsDir = buildDir + "/tools";
3536
var binDir = baseDir + "/bin";
3637
var nupkgDir = binDir + "/nupkg";
3738

38-
var taefBinDir = baseDir + "/UITests/UITests.Tests.TAEF/bin/Release/net5.0-windows10.0.19041/win10-x86";
39+
var taefBinDir = baseDir + $"/UITests/UITests.Tests.TAEF/bin/{configuration}/net5.0-windows10.0.19041/win10-x86";
3940

4041
var styler = toolsDir + "/XamlStyler.Console/tools/xstyler.exe";
4142
var stylerFile = baseDir + "/settings.xamlstyler";
@@ -167,7 +168,7 @@ Task("BuildProjects")
167168
{
168169
MaxCpuCount = 0
169170
}
170-
.SetConfiguration("Release")
171+
.SetConfiguration(configuration)
171172
.WithTarget("Restore");
172173

173174
UpdateToolsPath(buildSettings);
@@ -181,7 +182,7 @@ Task("BuildProjects")
181182
{
182183
MaxCpuCount = 0
183184
}
184-
.SetConfiguration("Release")
185+
.SetConfiguration(configuration)
185186
.EnableBinaryLogger()
186187
.WithTarget("Build");
187188

@@ -235,7 +236,7 @@ Task("Package")
235236
{
236237
MaxCpuCount = 0
237238
}
238-
.SetConfiguration("Release")
239+
.SetConfiguration(configuration)
239240
.WithTarget("Pack")
240241
.WithProperty("PackageOutputPath", nupkgDir);
241242

@@ -274,13 +275,13 @@ Task("Test")
274275
ArgumentCustomization = arg => arg.Append("/logger:trx;LogFileName=VsTestResultsUwp.trx /framework:FrameworkUap10"),
275276
};
276277

277-
VSTest(baseDir + "/**/Release/**/UnitTests.*.appxrecipe", testSettings);
278+
VSTest(baseDir + $"/**/{configuration}/**/UnitTests.*.appxrecipe", testSettings);
278279
}).DoesForEach(GetFiles(baseDir + "/**/UnitTests.*NetCore.csproj"), (file) =>
279280
{
280281
Information("\nRunning NetCore Unit Tests");
281282
var testSettings = new DotNetCoreTestSettings
282283
{
283-
Configuration = "Release",
284+
Configuration = configuration,
284285
NoBuild = true,
285286
Loggers = new[] { "trx;LogFilePrefix=VsTestResults" },
286287
Verbosity = DotNetCoreVerbosity.Normal,
@@ -329,7 +330,7 @@ Task("MSTestUITest")
329330

330331
var testSettings = new DotNetCoreTestSettings
331332
{
332-
Configuration = "Release",
333+
Configuration = configuration,
333334
NoBuild = true,
334335
Loggers = new[] { "trx;LogFilePrefix=VsTestResults" },
335336
Verbosity = DotNetCoreVerbosity.Normal

0 commit comments

Comments
 (0)