Skip to content

Commit e840393

Browse files
committed
Use dotnet runner autodetect mechanism
1 parent aac4ab9 commit e840393

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

make.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ Param(
55
[String] $target = "build",
66
[String] $configuration = "Release",
77
[String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'),
8-
[String] $platform = [Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture,
8+
[String] $platform = $null, # auto-detect
99
[switch] $runIgnored,
1010
[int] $jobs = [System.Environment]::ProcessorCount
1111
)
1212

1313
$ErrorActionPreference="Continue"
14-
if (-not $platform) { $platform = "x64"; }
1514

1615
[int] $global:Result = 0
1716
[bool] $global:isUnix = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Unix
@@ -76,12 +75,14 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $
7675
$doc.AppendChild($dec) | Out-Null
7776

7877
$runSettings = $doc.CreateElement("RunSettings")
79-
78+
8079
$runConfiguration = $doc.CreateElement("RunConfiguration")
8180
$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+
}
8586

8687
$testRunParameters = $doc.CreateElement("TestRunParameters")
8788
$runSettings.AppendChild($testRunParameters) | Out-Null

0 commit comments

Comments
 (0)