Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2ddb037
Add Code Action Apex tests based on TS
abonie Jul 12, 2026
b6fdb0d
Copy other integration tests to apex
abonie Jul 15, 2026
6c4ca07
Add orchestration for CI and fix missing assertion
abonie Jul 22, 2026
0c8b741
Remove Apex tests from slnx and gate on Insiders
abonie Jul 23, 2026
d1757c7
List VS instances
abonie Jul 23, 2026
f414963
Pin Apex 18.7
abonie Jul 24, 2026
2d4dbe9
Add more VS setup
abonie Jul 24, 2026
d2fd5fd
Debug logging
abonie Jul 25, 2026
2a772b0
Skip VS sign in
abonie Jul 26, 2026
fccb0c7
Start VS with an empty env
abonie Jul 27, 2026
19675db
Pin Roslyn packages differently for CI
abonie Jul 27, 2026
1596a31
Add missing eng/SetApexRoslynVersion.ps1 for the Apex Roslyn detectio…
abonie Jul 27, 2026
c0c3dd7
Roll System.Composition/Immutable back to 10.0.2 for the Apex leg
abonie Jul 28, 2026
1f2d505
Revert "Roll System.Composition/Immutable back to 10.0.2 for the Apex…
abonie Jul 28, 2026
07db08b
Add DartLab VS-integration pipeline scaffold for the F# Apex tests
abonie Jul 28, 2026
f846a7a
Point DartLab scaffold at the existing dnceng/internal/dotnet-fsharp …
abonie Aug 19, 2026
984c700
Align DartLab scaffold with Roslyn's current entry structure
abonie Aug 19, 2026
49e0e1b
Trigger F# Apex DartLab tests via /pr-val PR comment, not on VS builds
abonie Aug 20, 2026
3fd75ac
Merge remote-tracking branch 'origin/main' into apex-int-tests
abonie Aug 27, 2026
af194f0
Remove public-scout Apex CI leg and its Roslyn-version workaround
abonie Aug 27, 2026
8cf5f8a
Drop stale P4/P5 note from Apex README (both already done)
abonie Aug 27, 2026
8efe122
Run requested DartLab PR validation directly from GitHub
abonie Sep 23, 2026
1922e61
Use PowerShell for requested PR validation
abonie Sep 23, 2026
36cf069
Migrate Apex pipeline to DartLab-1ES
abonie Sep 30, 2026
997906c
Set F# Apex CloudTest lab
abonie Oct 5, 2026
12b6261
Merge upstream main into apex-dartlab-github
abonie Oct 5, 2026
a9f51f0
Run reviewed PR pipeline YAML for SHA-pinned DartLab requests
abonie Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove Apex tests from slnx and gate on Insiders
  • Loading branch information
abonie committed Jul 23, 2026
commit 0c8b741987f9e61c36ea53979921e9c68269f326
3 changes: 0 additions & 3 deletions VisualFSharp.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@
<Project Path="vsintegration/tests/FSharp.Editor.IntegrationTests/FSharp.Editor.IntegrationTests.csproj">
<BuildType Solution="Proto|*" Project="Debug" />
</Project>
<Project Path="vsintegration/tests/FSharp.Editor.Apex.IntegrationTests/FSharp.Editor.Apex.IntegrationTests.csproj">
<BuildType Solution="Proto|*" Project="Debug" />
</Project>
<Project Path="vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj">
<BuildType Solution="Proto|*" Project="Debug" />
</Project>
Expand Down
88 changes: 74 additions & 14 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,76 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str

# Runs the Apex VS integration tests. These are a classic MSTest (VSTest) project, NOT part of the
# repo's Microsoft.Testing.Platform 'dotnet test' path, and they drive a real VS instance via the Apex
# UI-automation framework — so they are launched with vstest.console.exe (from the installed VS) against
# the already-built test assembly. The F# VSIX must be deployed into the RoslynDev hive first
# (build with -deployExtensions); Apex launches devenv /rootsuffix RoslynDev.
# UI-automation framework — so they are launched with vstest.console.exe (from the installed VS).
# The project is intentionally excluded from VisualFSharp.slnx (its dependencies must version-match the
# VS it drives), so this builds it explicitly. It also must match a specific VS version
# (MicrosoftTestApexVisualStudioVersion); if the installed VS does not match, the run is skipped rather
# than producing confusing Apex/VS-mismatch failures. The F# VSIX must be deployed into the RoslynDev
# hive first (build with -deployExtensions); Apex launches devenv /rootsuffix RoslynDev.
function TestApexUsingVSTest([string] $targetFramework) {
$projectName = "FSharp.Editor.Apex.IntegrationTests"
$testAssembly = Join-Path $ArtifactsDir "bin\$projectName\$configuration\$targetFramework\$projectName.dll"
if (-not (Test-Path $testAssembly)) {
throw "Apex test assembly not found at '$testAssembly'. Build the VS solution first."
$apexProject = Join-Path $RepoRoot "vsintegration\tests\$projectName\$projectName.csproj"

# The Apex package (MicrosoftTestApexVisualStudioVersion) targets this VS major.minor. Keep in sync;
# override with FSHARP_APEX_VS_VERSION when a machine's matching VS has a different minor.
$expectedVsVersion = if (${env:FSHARP_APEX_VS_VERSION}) { ${env:FSHARP_APEX_VS_VERSION} } else { "18.9" }

# Determine which VS will run the tests, and gate on its version. An explicit
# VisualStudio.InstallationUnderTest.Path override is trusted (gate skipped); otherwise enumerate
# ALL installed VS instances (not just the latest) and pick the one whose major.minor matches the
# Apex target, skipping the run if none match rather than producing confusing Apex/VS-mismatch errors.
$overridePath = ${env:VisualStudio.InstallationUnderTest.Path}
if ($overridePath) {
Write-Host "Using explicit VisualStudio.InstallationUnderTest.Path=$overridePath (VS version gate skipped)."
$vsDir = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $overridePath))
}
else {
$vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe"
# Query the properties separately (parallel arrays in a stable order) instead of parsing
# `-format json`: Windows PowerShell 5.1's ConvertFrom-Json mishandles vswhere's multi-instance
# JSON array (it collapses the instances into one object with array-valued properties), which
# would make every version comparison fail. Build.ps1 runs under Windows PowerShell 5.1.
$versions = @()
$paths = @()
if (Test-Path $vswhere) {
$versions = @(& $vswhere -all -prerelease -products * -property installationVersion)
$paths = @(& $vswhere -all -prerelease -products * -property installationPath)
}
$found = $versions -join ', '

# Among installs whose major.minor matches the Apex target, pick the first that actually has an
# IDE (devenv.exe) — excludes Build Tools and catches an incomplete/mid-update install.
$vsDir = $null
$selectedVersion = $null
$versionMatchPath = $null
for ($k = 0; $k -lt $versions.Count; $k++) {
$mm = ($versions[$k] -split '\.')[0..1] -join '.'
if ($mm -eq $expectedVsVersion) {
if (-not $versionMatchPath) { $versionMatchPath = $paths[$k] }
if (Test-Path (Join-Path $paths[$k] "Common7\IDE\devenv.exe")) {
$vsDir = $paths[$k].TrimEnd("\")
$selectedVersion = $versions[$k]
break
}
}
}

$vsInfo = LocateVisualStudio
if ($null -eq $vsInfo) {
throw "Unable to locate a Visual Studio installation to run the Apex tests."
if (-not $vsDir) {
if ($versionMatchPath) {
Write-Host "##vso[task.logissue type=warning]Found VS $expectedVsVersion ($versionMatchPath) but no devenv.exe under Common7\IDE (incomplete install, Build Tools, or a VS update in progress); skipping Apex integration tests (non-gating)."
Write-Host "Skipping Apex tests: VS $expectedVsVersion present but devenv.exe missing at [$versionMatchPath]. If VS was updating, retry once it finishes."
}
else {
Write-Host "##vso[task.logissue type=warning]No installed VS matches the Apex target $expectedVsVersion (found: $found); skipping Apex integration tests (non-gating)."
Write-Host "Skipping Apex tests: no VS $expectedVsVersion found among installs [$found]. Set FSHARP_APEX_VS_VERSION or VisualStudio.InstallationUnderTest.Path to run against a different install."
}
return
}
Write-Host "Selected VS $selectedVersion at '$vsDir' for the Apex tests (target $expectedVsVersion)."
# This process env var propagates to the child vstest.console -> testhost -> Apex processes.
${env:VisualStudio.InstallationUnderTest.Path} = Join-Path $vsDir "Common7\IDE\devenv.exe"
}
$vsDir = $vsInfo.installationPath.TrimEnd("\")

$vstestConsole = @(
(Join-Path $vsDir "Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"),
(Join-Path $vsDir "Common7\IDE\Extensions\TestPlatform\vstest.console.exe")
Expand All @@ -429,10 +484,15 @@ function TestApexUsingVSTest([string] $targetFramework) {
throw "vstest.console.exe not found under '$vsDir' (looked in CommonExtensions\Microsoft\TestWindow and Extensions\TestPlatform)."
}

# Point Apex at this VS install so it does not rely on the local-only 'Canary' milestone lookup.
# This process env var propagates to the child vstest.console -> testhost processes.
if (-not ${env:VisualStudio.InstallationUnderTest.Path}) {
${env:VisualStudio.InstallationUnderTest.Path} = Join-Path $vsDir "Common7\IDE\devenv.exe"
# Build the Apex test project explicitly (it is intentionally excluded from VisualFSharp.slnx).
$dotnetPath = InitializeDotNetCli
$dotnetExe = Join-Path $dotnetPath "dotnet.exe"
$buildBinLog = "$LogDir\${projectName}_$targetFramework.binlog"
Exec-Console $dotnetExe "build `"$apexProject`" -c $configuration /bl:`"$buildBinLog`""

$testAssembly = Join-Path $ArtifactsDir "bin\$projectName\$configuration\$targetFramework\$projectName.dll"
if (-not (Test-Path $testAssembly)) {
throw "Apex test assembly not found at '$testAssembly' after build."
}

$testResultsDir = "$ArtifactsDir\TestResults\$configuration"
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<MicrosoftVisualStudioPlatformVSEditorVersion>$(VisualStudioEditorPackagesVersion)</MicrosoftVisualStudioPlatformVSEditorVersion>
<MicrosoftVisualStudioTextUIWpfVersion>$(VisualStudioEditorPackagesVersion)</MicrosoftVisualStudioTextUIWpfVersion>
<NuGetVisualStudioVersion>17.14.0</NuGetVisualStudioVersion>
<MicrosoftTestApexVisualStudioVersion>18.10.0-preview-1-12005-078</MicrosoftTestApexVisualStudioVersion>
<MicrosoftTestApexVisualStudioVersion>18.9.0-preview-1-11914-018</MicrosoftTestApexVisualStudioVersion>
<MSTestVersion>3.6.4</MSTestVersion>
<MicrosoftVisualStudioExtensibilityTestingVersion>0.1.800-beta</MicrosoftVisualStudioExtensibilityTestingVersion>
<MicrosoftVisualStudioExtensibilityTestingSourceGeneratorVersion>$(MicrosoftVisualStudioExtensibilityTestingVersion)</MicrosoftVisualStudioExtensibilityTestingSourceGeneratorVersion>
Expand Down
Loading