Skip to content
Merged
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
Add missing eng/SetApexRoslynVersion.ps1 for the Apex Roslyn detectio…
…n step

The azure-pipelines-PR.yml 'Detect CI VS Roslyn version' step and the
FSHARP_APEX_ROSLYN_VERSION override in eng/Versions.props were committed, but the
script itself was left untracked, so on CI 'powershell: eng\SetApexRoslynVersion.ps1'
could not find the file and failed with 'The module ''eng'' could not be loaded'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fe2b3239-4176-4f13-b6f6-486c8799765a
  • Loading branch information
abonie and Copilot committed Jul 27, 2026
commit 1596a31e2de1c5c30c9090e20c924cb70c7b6a38
82 changes: 82 additions & 0 deletions eng/SetApexRoslynVersion.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Detects the Roslyn version of the *installed* Visual Studio and exports it as the pipeline variable
# FSHARP_APEX_ROSLYN_VERSION so the Apex integration-test leg builds the F# VSIX against it.
#
# Why: the repo pins Roslyn forward (to the VS being inserted into), which is newer than any VS on the CI
# scout image. A VSIX built against that pin cannot bind Microsoft.VisualStudio.LanguageServices at
# runtime in the older CI VS, so FSharpPackage/FSharpProjectPackage fail to load and every Apex test
# fails. The F# editor references Roslyn compile-only (ExcludeAssets=runtime), so building against the
# VS's own Roslyn version is sufficient and ships nothing extra. The eng/Versions.props override consumes
# this variable; the committed pin is unchanged. If detection fails we leave the variable unset (the
# build falls back to the committed pin) rather than break the build.
[CmdletBinding()]
param()

$ErrorActionPreference = 'Stop'

function Write-Skip([string] $message) {
Write-Host "##vso[task.logissue type=warning]$message"
Write-Host "Apex Roslyn override not set; the VSIX will build against the repo's pinned Roslyn."
}

$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
if (-not (Test-Path $vswhere)) {
Write-Skip "vswhere.exe not found; cannot detect the installed VS Roslyn version."
return
}

# Select the same install the Apex gate runs against: the lowest matching (default major '18') VS that
# actually has devenv.exe. On CI there is a single VS, so any selection resolves to it.
$prefix = if (${env:FSHARP_APEX_VS_VERSION}) { ${env:FSHARP_APEX_VS_VERSION} } else { '18' }
$versions = @(& $vswhere -all -prerelease -products * -property installationVersion)
$paths = @(& $vswhere -all -prerelease -products * -property installationPath)

$candidates = for ($i = 0; $i -lt $versions.Count; $i++) {
if ($versions[$i] -like "$prefix.*") {
[PSCustomObject]@{ Version = $versions[$i]; Path = $paths[$i] }
}
}
$candidates = @($candidates | Sort-Object { [version]$_.Version })

$vsDir = $null
foreach ($c in $candidates) {
if (Test-Path (Join-Path $c.Path 'Common7\IDE\devenv.exe')) { $vsDir = $c.Path.TrimEnd('\'); break }
}
if (-not $vsDir) {
Write-Skip "No installed VS $prefix.x with devenv.exe found; cannot detect the Roslyn version."
return
}

$lsDll = Join-Path $vsDir 'Common7\IDE\CommonExtensions\Microsoft\VBCSharp\LanguageServices\Microsoft.VisualStudio.LanguageServices.dll'
if (-not (Test-Path $lsDll)) {
$lsDll = Get-ChildItem -Path $vsDir -Recurse -Filter 'Microsoft.VisualStudio.LanguageServices.dll' -ErrorAction SilentlyContinue |
Select-Object -First 1 -ExpandProperty FullName
}
if (-not $lsDll -or -not (Test-Path $lsDll)) {
Write-Skip "Microsoft.VisualStudio.LanguageServices.dll not found under '$vsDir'."
return
}

$asmVersion = [System.Reflection.AssemblyName]::GetAssemblyName($lsDll).Version
$majorMinor = "$($asmVersion.Major).$($asmVersion.Minor)"
Write-Host "Installed VS '$vsDir' ships Roslyn assembly $asmVersion (major.minor $majorMinor)."

# Resolve a matching Microsoft.CodeAnalysis NuGet version. The whole Roslyn family is published together
# with the same version, and every '<major>.<minor>.0-*' build has assembly version <major>.<minor>.0.0,
# so any such package binds to the installed VS at runtime; pick the newest for freshness.
$feed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3'
try {
$allVersions = (Invoke-RestMethod -Uri "$feed/flat2/microsoft.codeanalysis.externalaccess.fsharp/index.json" -UseBasicParsing).versions
} catch {
Write-Skip "Failed to query the dotnet-tools feed for Roslyn versions: $($_.Exception.Message)"
return
}

$selected = @($allVersions | Where-Object { $_ -match "^$([regex]::Escape($majorMinor))\.0-" }) |
Sort-Object | Select-Object -Last 1
if (-not $selected) {
Write-Skip "No Roslyn package '$majorMinor.0-*' found on the feed to match the installed VS."
return
}

Write-Host "Selected Roslyn NuGet version '$selected' for the Apex VSIX build (matches VS Roslyn $majorMinor)."
Write-Host "##vso[task.setvariable variable=FSHARP_APEX_ROSLYN_VERSION]$selected"
Loading