|
5 | 5 | [String] $target = "build", |
6 | 6 | [String] $configuration = "Release", |
7 | 7 | [String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'), |
8 | | - [String] $platform = [Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture, |
| 8 | + [String] $platform = $null, # auto-detect |
9 | 9 | [switch] $runIgnored, |
10 | 10 | [int] $jobs = [System.Environment]::ProcessorCount |
11 | 11 | ) |
12 | 12 |
|
13 | 13 | $ErrorActionPreference="Continue" |
14 | | -if (-not $platform) { $platform = "x64"; } |
15 | 14 |
|
16 | 15 | [int] $global:Result = 0 |
17 | 16 | [bool] $global:isUnix = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Unix |
@@ -76,12 +75,14 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $ |
76 | 75 | $doc.AppendChild($dec) | Out-Null |
77 | 76 |
|
78 | 77 | $runSettings = $doc.CreateElement("RunSettings") |
79 | | - |
| 78 | + |
80 | 79 | $runConfiguration = $doc.CreateElement("RunConfiguration") |
81 | 80 | $runSettings.AppendChild($runConfiguration) | Out-Null |
82 | | - $targetPlatform = $doc.CreateElement("TargetPlatform") |
83 | | - $targetPlatform.InnerText = $platform |
84 | | - $runConfiguration.AppendChild($targetPlatform) | Out-Null |
| 81 | + if ($platform) { |
| 82 | + $targetPlatform = $doc.CreateElement("TargetPlatform") |
| 83 | + $targetPlatform.InnerText = $platform |
| 84 | + $runConfiguration.AppendChild($targetPlatform) | Out-Null |
| 85 | + } |
85 | 86 |
|
86 | 87 | $testRunParameters = $doc.CreateElement("TestRunParameters") |
87 | 88 | $runSettings.AppendChild($testRunParameters) | Out-Null |
|
0 commit comments