|
5 | 5 | [String] $target = "build", |
6 | 6 | [String] $configuration = "Release", |
7 | 7 | [String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'), |
8 | | - [String] $platform = "x64", |
| 8 | + [String] $platform = $null, # auto-detect |
9 | 9 | [switch] $runIgnored, |
10 | 10 | [int] $jobs = [System.Environment]::ProcessorCount |
11 | 11 | ) |
@@ -62,21 +62,27 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $ |
62 | 62 | [System.Xml.XmlDocument]$doc = New-Object System.Xml.XmlDocument |
63 | 63 |
|
64 | 64 | # <RunSettings> |
| 65 | +# <RunConfiguration> |
| 66 | +# <TargetPlatform>x64</TargetPlatform> |
| 67 | +# </RunConfiguration> |
65 | 68 | # <TestRunParameters> |
66 | 69 | # <Parameter name="FRAMEWORK" value="net462" /> |
| 70 | +# <Parameter name="CONFIGURATION" value="Release" /> |
67 | 71 | # </TestRunParameters> |
68 | 72 | # </RunSettings> |
69 | 73 |
|
70 | 74 | $dec = $doc.CreateXmlDeclaration("1.0","UTF-8",$null) |
71 | 75 | $doc.AppendChild($dec) | Out-Null |
72 | 76 |
|
73 | 77 | $runSettings = $doc.CreateElement("RunSettings") |
74 | | - |
| 78 | + |
75 | 79 | $runConfiguration = $doc.CreateElement("RunConfiguration") |
76 | 80 | $runSettings.AppendChild($runConfiguration) | Out-Null |
77 | | - $targetPlatform = $doc.CreateElement("TargetPlatform") |
78 | | - $targetPlatform.InnerText = $platform |
79 | | - $runConfiguration.AppendChild($targetPlatform) | Out-Null |
| 81 | + if ($platform) { |
| 82 | + $targetPlatform = $doc.CreateElement("TargetPlatform") |
| 83 | + $targetPlatform.InnerText = $platform |
| 84 | + $runConfiguration.AppendChild($targetPlatform) | Out-Null |
| 85 | + } |
80 | 86 |
|
81 | 87 | $testRunParameters = $doc.CreateElement("TestRunParameters") |
82 | 88 | $runSettings.AppendChild($testRunParameters) | Out-Null |
|
0 commit comments