Skip to content

Commit

Permalink
Use dotnet runner autodetect mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
BCSharp committed Dec 11, 2024
1 parent aac4ab9 commit e840393
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e840393

Please sign in to comment.