From e84039302d6a44fd712999b7185260e2a4f7a6b3 Mon Sep 17 00:00:00 2001 From: Pavel Koneski Date: Tue, 10 Dec 2024 19:44:17 -0800 Subject: [PATCH] Use dotnet runner autodetect mechanism --- make.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/make.ps1 b/make.ps1 index 9a8be02b3..32786dd37 100755 --- a/make.ps1 +++ b/make.ps1 @@ -5,13 +5,12 @@ Param( [String] $target = "build", [String] $configuration = "Release", [String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'), - [String] $platform = [Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture, + [String] $platform = $null, # auto-detect [switch] $runIgnored, [int] $jobs = [System.Environment]::ProcessorCount ) $ErrorActionPreference="Continue" -if (-not $platform) { $platform = "x64"; } [int] $global:Result = 0 [bool] $global:isUnix = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Unix @@ -76,12 +75,14 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $ $doc.AppendChild($dec) | Out-Null $runSettings = $doc.CreateElement("RunSettings") - + $runConfiguration = $doc.CreateElement("RunConfiguration") $runSettings.AppendChild($runConfiguration) | Out-Null - $targetPlatform = $doc.CreateElement("TargetPlatform") - $targetPlatform.InnerText = $platform - $runConfiguration.AppendChild($targetPlatform) | Out-Null + if ($platform) { + $targetPlatform = $doc.CreateElement("TargetPlatform") + $targetPlatform.InnerText = $platform + $runConfiguration.AppendChild($targetPlatform) | Out-Null + } $testRunParameters = $doc.CreateElement("TestRunParameters") $runSettings.AppendChild($testRunParameters) | Out-Null