microsoft / microsoft/aspire

E2E Deployment Test Failure: Aspire.Deployment.EndToEnd.Tests.AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.DeployTypeScriptApiWithCertManagerToAzureKubernetesEnvironment

Open
#17,427 1 comment 0 reactions 1 assignee Claimed by @mitchdenny View on GitHub
area-testing deployment-e2e triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Failing Test

`Aspire.Deployment.EndToEnd.Tests.AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.DeployTypeScriptApiWithCertManagerToAzureKubernetesEnvironment`

## Symptom

```
System.IO.FileNotFoundException : Could not find file
'/tmp/Aspire.Cli.Tests/TemporaryWorkspaces//AksCertManagerTs/apphost.ts'.
```

Thrown at `tests/Aspire.Deployment.EndToEnd.Tests/AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs:136` inside `File.ReadAllText(appHostFilePath)`.

## Root Cause

The test (and its XML doc on line 132) hard-codes the AppHost path as `apphost.ts`:

```csharp
var appHostFilePath = Path.Combine(projectDir, "apphost.ts");
```

However, since PR #16984 ("Use mts for TypeScript AppHosts"), the TypeScript starter template emits **`apphost.mts`** instead of `apphost.ts`. See [`CliTemplateFactory.TypeScriptStarterTemplate.cs#L75`](https://github.com/microsoft/aspire/blob/main/src/Aspire.Cli/Templating/CliTemplateFactory.TypeScriptStarterTemplate.cs#L75):

```csharp
var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "apphost.mts")));
```

So the test's `File.ReadAllText` immediately fails because `apphost.ts` does not exist in the created project.

## Fix

Rename the test's references to `apphost.ts` → `apphost.mts` (file path + comments + XML doc).

## Affected Runs

- https://github.com/microsoft/aspire/actions/runs/26323258106 (2026-05-23)

> This issue was created automatically by a workflow analyzing Deployment E2E test failures on `main`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.