Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
85 changes: 70 additions & 15 deletions .github/workflows/extension-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,26 @@ jobs:
archivePattern: aspire-cli-win-x64*.zip
cliBinary: aspire.exe
useXvfb: false
- name: Linux
shardName: browser-debugger
spec: out/test-e2e/test-e2e/browserDebugger.e2e.test.js
runner: ubuntu-latest
rid: linux-x64
archivePattern: aspire-cli-linux-x64*.tar.gz
cliBinary: aspire
useXvfb: true
browser: chrome
installDotnetDebugger: true
- name: Windows
shardName: browser-debugger
spec: out/test-e2e/test-e2e/browserDebugger.e2e.test.js
runner: windows-latest
rid: win-x64
archivePattern: aspire-cli-win-x64*.zip
cliBinary: aspire.exe
useXvfb: false
browser: msedge
installDotnetDebugger: true
- name: Linux
shardName: azure-functions
advisoryIssue: https://github.com/microsoft/aspire/issues/19639
Expand Down Expand Up @@ -541,7 +561,55 @@ jobs:
Start-Sleep -Seconds $delay
}

- name: Install Azure Functions E2E prerequisites
- name: .NET debugger E2E prerequisites
if: ${{ matrix.installDotnetDebugger || matrix.installAzureFunctions }}
run: |
function Get-PinnedArtifact {
param(
[Parameter(Mandatory = $true)]
[string] $Uri,
[Parameter(Mandatory = $true)]
[string] $OutFile,
[Parameter(Mandatory = $true)]
[string] $ExpectedSha256
)

Invoke-WebRequest -Uri $Uri -OutFile $OutFile -MaximumRetryCount 3 -RetryIntervalSec 5
$actualSha256 = (Get-FileHash -Path $OutFile -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actualSha256 -ne $ExpectedSha256) {
throw "Checksum verification failed for '$OutFile'. Expected '$ExpectedSha256', got '$actualSha256'."
}
}

$dotnetRuntimeVsix = Join-Path $env:RUNNER_TEMP 'vscode-dotnet-runtime-3.1.0.vsix'
Get-PinnedArtifact `
-Uri 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/vscode-dotnet-runtime/3.1.0/vspackage' `
-OutFile $dotnetRuntimeVsix `
-ExpectedSha256 '8e675ffe5f3674430d63e28d2dc05ab40f36c8494e9549e79d3995d721b13f5a'

switch ($env:RUNNER_OS) {
'Linux' {
$csharpVsix = Join-Path $env:RUNNER_TEMP 'vscode-csharp-2.148.23-linux-x64.vsix'
$csharpUri = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/csharp/2.148.23/vspackage?targetPlatform=linux-x64'
$csharpSha256 = '18b503e614a979212762683b35a4fa1806688ba773d5fe93bf62c9f9346db23f'
}
'Windows' {
$csharpVsix = Join-Path $env:RUNNER_TEMP 'vscode-csharp-2.148.23-win32-x64.vsix'
$csharpUri = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/csharp/2.148.23/vspackage?targetPlatform=win32-x64'
$csharpSha256 = '27cf5f0fdcd677f7af61a6d43f2dc75bac7ca2cffa1f29e3262b615bbcabb952'
}
default {
throw "The .NET debugger E2E prerequisites do not support runner OS '$env:RUNNER_OS'."
}
}

Get-PinnedArtifact -Uri $csharpUri -OutFile $csharpVsix -ExpectedSha256 $csharpSha256
@(
"ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX=$dotnetRuntimeVsix"
"ASPIRE_EXTENSION_E2E_CSHARP_VSIX=$csharpVsix"
) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Azure Functions E2E prerequisites
if: ${{ matrix.installAzureFunctions }}
shell: bash
run: |
Expand All @@ -561,18 +629,6 @@ jobs:
export PATH="$core_tools_directory:$PATH"
func --version

dotnet_runtime_vsix="$RUNNER_TEMP/vscode-dotnet-runtime-3.1.0.vsix"
curl --fail --location --compressed --retry 3 --retry-all-errors \
--output "$dotnet_runtime_vsix" \
'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/vscode-dotnet-runtime/3.1.0/vspackage'
echo '8e675ffe5f3674430d63e28d2dc05ab40f36c8494e9549e79d3995d721b13f5a '"$dotnet_runtime_vsix" | sha256sum --check -

csharp_vsix="$RUNNER_TEMP/vscode-csharp-2.148.23-linux-x64.vsix"
curl --fail --location --compressed --retry 3 --retry-all-errors \
--output "$csharp_vsix" \
'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/csharp/2.148.23/vspackage?targetPlatform=linux-x64'
echo '18b503e614a979212762683b35a4fa1806688ba773d5fe93bf62c9f9346db23f '"$csharp_vsix" | sha256sum --check -

azure_resource_groups_vsix="$RUNNER_TEMP/vscode-azureresourcegroups-0.12.7.vsix"
curl --fail --location --compressed --retry 3 --retry-all-errors \
--output "$azure_resource_groups_vsix" \
Expand All @@ -587,8 +643,6 @@ jobs:

{
echo 'ASPIRE_EXTENSION_E2E_ENABLE_AZURE_FUNCTIONS=true'
echo "ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX=$dotnet_runtime_vsix"
echo "ASPIRE_EXTENSION_E2E_CSHARP_VSIX=$csharp_vsix"
echo "ASPIRE_EXTENSION_E2E_AZURE_RESOURCE_GROUPS_VSIX=$azure_resource_groups_vsix"
echo "ASPIRE_EXTENSION_E2E_AZURE_FUNCTIONS_VSIX=$azure_functions_vsix"
echo 'FUNCTIONS_CORE_TOOLS_TELEMETRY_OPTOUT=1'
Expand Down Expand Up @@ -935,6 +989,7 @@ jobs:
ASPIRE_EXTENSION_E2E_VSIX: ${{ github.workspace }}/extension/out/aspire-extension.vsix
ASPIRE_EXTENSION_E2E_SHARD: ${{ matrix.shardName }}
ASPIRE_EXTENSION_E2E_SPEC: ${{ matrix.spec }}
ASPIRE_EXTENSION_E2E_BROWSER: ${{ matrix.browser }}
ASPIRE_EXTENSION_E2E_ADVISORY_ISSUE: ${{ matrix.advisoryIssue }}
ASPIRE_EXTENSION_E2E_UNSET_CLI_START_TIMEOUT: ${{ matrix.unsetCliStartTimeout }}
# Linux E2E jobs run under Xvfb, where ffmpeg recordings are compact
Expand Down
14 changes: 14 additions & 0 deletions extension/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ ASPIRE_EXTENSION_E2E_ENABLE_AZURE_FUNCTIONS=true ASPIRE_EXTENSION_E2E_DOTNET_RUN
ASPIRE_EXTENSION_E2E_ENABLE_WINUI=true ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX=/path/to/vscode-dotnet-runtime.vsix ASPIRE_EXTENSION_E2E_CSHARP_VSIX=/path/to/vscode-csharp-win32-x64.vsix ASPIRE_EXTENSION_E2E_SHARD=winui-debug ASPIRE_EXTENSION_E2E_SPEC=out/test-e2e/test-e2e/winUiDebug.e2e.test.js ASPIRE_EXTENSION_E2E_CLI_PATH=/path/to/aspire corepack yarn test:e2e
```

#### Blazor WebAssembly browser debugger E2E

Run the managed browser debugger proof with platform-specific .NET Install Tool and C# VSIX files:

```bash
ASPIRE_EXTENSION_E2E_SHARD=browser-debugger \
ASPIRE_EXTENSION_E2E_SPEC=out/test-e2e/test-e2e/browserDebugger.e2e.test.js \
ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX="$DOTNET_RUNTIME_VSIX" \
ASPIRE_EXTENSION_E2E_CSHARP_VSIX="$CSHARP_VSIX" \
corepack yarn test:e2e
```

Linux exercises Chrome, while Windows exercises Edge. The shard generates standalone, hosted-global, and hosted-per-page .NET 10 fixtures. Both VSIX files must match the current platform, and C# must be 2.145.15-prerelease or newer.

The E2E fixtures target .NET 10, matching the SDK pinned by the repository's `global.json`. The Azure Functions shard additionally requires Azure Functions Core Tools v4 (`func`) on `PATH`. It installs the real .NET Install Tool, C#, Azure Resource Groups, and Azure Functions extensions into the isolated VS Code instance, generates a dedicated HTTPS certificate with shell-sensitive arguments, and activates the Azure Functions extension so it registers its `func` task definition and listeners. Aspire then creates and runs a registered `func: host start` task for the generated .NET isolated Functions resource; the shard probes its HTTPS endpoint and verifies that stopping the Aspire resource ends the same VS Code task. CI runs this shard on Linux with pinned, checksum-verified copies of Core Tools 4.12.1, .NET Install Tool 3.1.0, C# 2.148.23 for Linux x64, Azure Resource Groups 0.12.7, and Azure Functions 1.22.0.

The `winui-debug` shard is Windows-only. It installs pinned .NET Install Tool and C# VSIX files into the offline VS Code instance, generates a self-contained unpackaged WinUI project, and debugs it as an Aspire project resource. Before starting Aspire, the shard waits for the C# definition provider to resolve the XAML-generated `InitializeComponent` method. This prevents the C# language server's design-time build and the Aspire CLI build from invoking `XamlCompiler.exe` against the same `obj\...\input.json`; a restore or prebuild alone is insufficient because the later build still runs the XAML compiler passes. The app then writes a readiness marker from `Application.OnLaunched`; reaching that marker proves WinUI passed the `Application.Start` failure point covered by the regression. Dependabot does not update the raw Marketplace VSIX URLs or checksums. Treat them as regression inputs rather than current-version dependencies: rebaseline them manually only when VS Code compatibility requires it or the fixture is deliberately moved, and before changing the C# version verify that the old `TargetPath` launch still reproduces [the original crash](https://github.com/microsoft/aspire/issues/19091) while the `RunCommand` launch passes.
Expand Down
9 changes: 9 additions & 0 deletions extension/loc/xlf/aspire-vscode.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@
"aspire-vscode.strings.failedToCleanUpMsBuildTemporaryDirectory": "Failed to clean up temporary MSBuild directory '{0}': {1}",
"aspire-vscode.strings.unsupportedBrowserDebugTarget": "Browser '{0}' cannot be debugged for '{1}'. Supported browsers are: {2}.",
"aspire-vscode.strings.unsupportedBrowserDebugTargetWithoutUrl": "Browser '{0}' cannot be debugged. Supported browsers are: {1}.",
"aspire-vscode.strings.csharpExtensionMissingForBlazorDebugging": "Debugging this Blazor client requires {0} version {1} or later. Install the C# extension, then start debugging again.",
"aspire-vscode.strings.csharpExtensionOutdatedForBlazorDebugging": "Debugging this Blazor client requires {0} version {2} or later. Installed version: {1}. Update the C# extension, then start debugging again.",
"aspire-vscode.strings.missingBlazorClientProject": "The Blazor client project '{0}' does not exist. Restore or rebuild the AppHost, then start debugging again.",
"aspire-vscode.strings.noAppHostInWorkspace": "No AppHost found in the Aspire settings file.",
"aspire-vscode.strings.dashboard": "Dashboard",
"aspire-vscode.strings.codespaces": "Codespaces",
Expand Down
Loading