Skip to content

Commit 637b411

Browse files
authored
Merge branch 'release/10.0.1xx' into update-man-page-2025-10-31
2 parents cbe585b + 3820e27 commit 637b411

File tree

5 files changed

+78
-10
lines changed

5 files changed

+78
-10
lines changed

build/RunTestsOnHelix.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ set PATH=%DOTNET_ROOT%;%PATH%
1010
set DOTNET_MULTILEVEL_LOOKUP=0
1111
set TestFullMSBuild=%1
1212

13+
REM Ensure Visual Studio instances allow preview SDKs
14+
PowerShell -ExecutionPolicy ByPass -NoProfile -File "%HELIX_CORRELATION_PAYLOAD%\t\eng\enable-preview-sdks.ps1"
15+
1316
REM Use powershell to call partical Arcade logic to get full framework msbuild path and assign it
1417
if "%TestFullMSBuild%"=="true" (
1518
FOR /F "tokens=*" %%g IN ('PowerShell -ExecutionPolicy ByPass -File "%HELIX_CORRELATION_PAYLOAD%\t\eng\print-full-msbuild-path.ps1"') do (SET DOTNET_SDK_TEST_MSBUILD_PATH=%%g)

eng/Version.Details.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ This file should be imported by eng/Versions.props
140140
<!-- dotnet/core-setup dependencies -->
141141
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
142142
<!-- microsoft/testfx dependencies -->
143-
<MicrosoftTestingPlatformPackageVersion>2.1.0-preview.25561.13</MicrosoftTestingPlatformPackageVersion>
144-
<MSTestPackageVersion>4.1.0-preview.25561.13</MSTestPackageVersion>
143+
<MicrosoftTestingPlatformPackageVersion>2.1.0-preview.25561.14</MicrosoftTestingPlatformPackageVersion>
144+
<MSTestPackageVersion>4.1.0-preview.25561.14</MSTestPackageVersion>
145145
</PropertyGroup>
146146
<!--Property group for alternate package version names-->
147147
<PropertyGroup>

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,13 +553,13 @@
553553
<Uri>https://github.com/dotnet/dotnet</Uri>
554554
<Sha>50d79701f2d748e965fefb4ba42580368598b9cc</Sha>
555555
</Dependency>
556-
<Dependency Name="Microsoft.Testing.Platform" Version="2.1.0-preview.25561.13">
556+
<Dependency Name="Microsoft.Testing.Platform" Version="2.1.0-preview.25561.14">
557557
<Uri>https://github.com/microsoft/testfx</Uri>
558-
<Sha>c60f4f766766774d2b45ff4f62abe3d9b269ebee</Sha>
558+
<Sha>1508e05c4c263d9054122fa7f32d76ecde483857</Sha>
559559
</Dependency>
560-
<Dependency Name="MSTest" Version="4.1.0-preview.25561.13">
560+
<Dependency Name="MSTest" Version="4.1.0-preview.25561.14">
561561
<Uri>https://github.com/microsoft/testfx</Uri>
562-
<Sha>c60f4f766766774d2b45ff4f62abe3d9b269ebee</Sha>
562+
<Sha>1508e05c4c263d9054122fa7f32d76ecde483857</Sha>
563563
</Dependency>
564564
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="10.0.0">
565565
<Uri>https://github.com/dotnet/dotnet</Uri>

eng/common/tools.ps1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ function InstallDotNet([string] $dotnetRoot,
306306
if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" }
307307
if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" }
308308
$runtimePath = $runtimePath + "\" + $version
309-
309+
310310
$dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'"
311311

312312
if (Test-Path $runtimePath) {
@@ -560,19 +560,25 @@ function LocateVisualStudio([object]$vsRequirements = $null){
560560
})
561561
}
562562

563-
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
563+
if (!$vsRequirements) {
564+
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs' -ErrorAction SilentlyContinue) {
565+
$vsRequirements = $GlobalJson.tools.vs
566+
} else {
567+
$vsRequirements = $null
568+
}
569+
}
564570
$args = @('-latest', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
565571

566572
if (!$excludePrereleaseVS) {
567573
$args += '-prerelease'
568574
}
569575

570-
if (Get-Member -InputObject $vsRequirements -Name 'version') {
576+
if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'version' -ErrorAction SilentlyContinue)) {
571577
$args += '-version'
572578
$args += $vsRequirements.version
573579
}
574580

575-
if (Get-Member -InputObject $vsRequirements -Name 'components') {
581+
if ($vsRequirements -and (Get-Member -InputObject $vsRequirements -Name 'components' -ErrorAction SilentlyContinue)) {
576582
foreach ($component in $vsRequirements.components) {
577583
$args += '-requires'
578584
$args += $component

eng/enable-preview-sdks.ps1

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
param()
2+
3+
. $PSScriptRoot\common\tools.ps1
4+
5+
try {
6+
$vsInfo = LocateVisualStudio
7+
}
8+
catch {
9+
Write-Host "LocateVisualStudio failed: $_"
10+
return
11+
}
12+
13+
if ($null -eq $vsInfo) {
14+
Write-Host "No Visual Studio instance detected; preview SDKs remain enabled by default."
15+
return
16+
}
17+
18+
$vsId = $vsInfo.instanceId
19+
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
20+
$instanceDir = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\VisualStudio\$vsMajorVersion.0_$vsId"
21+
22+
Create-Directory $instanceDir
23+
24+
$sdkFile = Join-Path $instanceDir 'sdk.txt'
25+
26+
$desiredLine = 'UsePreviews=True'
27+
$existingLines = @()
28+
29+
if (Test-Path $sdkFile) {
30+
$existingLines = @(Get-Content -Path $sdkFile -Encoding ASCII)
31+
}
32+
33+
# Determine how to place the UsePreviews flag based on existing content.
34+
$replacementIndex = -1
35+
for ($i = 0; $i -lt $existingLines.Count; $i++) {
36+
if ($existingLines[$i] -match '^UsePreviews=.*$') {
37+
$replacementIndex = $i
38+
break
39+
}
40+
}
41+
42+
# Replace the existing line to enforce it as True
43+
if ($replacementIndex -ge 0) {
44+
$updatedLines = $existingLines
45+
$updatedLines[$replacementIndex] = $desiredLine
46+
}
47+
elseif ($existingLines.Count -gt 0) {
48+
# Write to the top of the file but keep the remaining portion (assumption: order does not matter to VS)
49+
$updatedLines = @($desiredLine) + $existingLines
50+
}
51+
else {
52+
# Write a whole new file
53+
$updatedLines = @($desiredLine)
54+
}
55+
56+
Set-Content -Path $sdkFile -Value $updatedLines -Encoding ASCII
57+
58+
Write-Host "Updated $sdkFile"
59+
Get-Content -Path $sdkFile | ForEach-Object { Write-Host " $_" }

0 commit comments

Comments
 (0)