Failing test: Template tests randomly failing with ` The SDK 'Aspire.AppHost.Sdk/13.0.0-ci' specified could not be found.` not found.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
## Build Information
Build: https://github.com/dotnet/aspire/actions/runs/18829346089
Build error leg or test failing: Aspire.Templates.Tests.XUnit_V3MTP_NewUpAndBuildSupportProjectTemplatesTests.CanNewAndBuild
Pull request:
## Error Message
Fill the error message using [step by step known issues guidance](https://github.com/dotnet/arcade/blob/main/Documentation/Projects/Build%20Analysis/KnownIssueJsonStepByStep.md).
```json
{
"ErrorMessage": "",
"ErrorPattern": "The SDK 'Aspire.AppHost.Sdk.*could not be found",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
```
## Error Details
```
ToolCommandException : `dotnet new aspire-apphost -o "new_build_aspire_xunit_itjiobag_cyh.AppHost" -f net8.0` . Output: The template "Aspire AppHost" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/dotnet/aspire/third-party-notices for details.
Processing post-creation actions...
Restoring /private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/templates-testroot/new_build_aspire_xunit_itjiobag_cyh_root/new_build_aspire_xunit_itjiobag_cyh.AppHost/new_build_aspire_xunit_itjiobag_cyh.AppHost.csproj:
/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/templates-testroot/new_build_aspire_xunit_itjiobag_cyh_root/new_build_aspire_xunit_itjiobag_cyh.AppHost/new_build_aspire_xunit_itjiobag_cyh.AppHost.csproj : error : Could not resolve SDK "Aspire.AppHost.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/templates-testroot/new_build_aspire_xunit_itjiobag_cyh_root/new_build_aspire_xunit_itjiobag_cyh.AppHost/new_build_aspire_xunit_itjiobag_cyh.AppHost.csproj : error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/templates-testroot/new_build_aspire_xunit_itjiobag_cyh_root/new_build_aspire_xunit_itjiobag_cyh.AppHost/new_build_aspire_xunit_itjiobag_cyh.AppHost.csproj : error : Failed to resolve SDK 'Aspire.AppHost.Sdk/13.0.0-ci'. Package restore was successful but a package with the ID of "Aspire.AppHost.Sdk" was not installed.
/private/var/folders/xc/cl1fyykn2pj4ryhdw6r1mqtc0000gn/T/templates-testroot/new_build_aspire_xunit_itjiobag_cyh_root/new_build_aspire_xunit_itjiobag_cyh.AppHost/new_build_aspire_xunit_itjiobag_cyh.AppHost.csproj : error MSB4236: The SDK 'Aspire.AppHost.Sdk/13.0.0-ci' specified could not be found.
Restore failed.
Post action failed.
Manual instructions: Run 'dotnet restore'
An update for template package 'Aspire.ProjectTemplates::13.0.0-ci' is available.
To update the package use:
dotnet new install Aspire.ProjectTemplates::13.0.0-preview.1.25526.2
```
Stack Trace
```
at Aspire.Templates.Tests.AspireProject.CreateNewTemplateProjectAsync(String id, String template, ITestOutputHelper testOutput, BuildEnvironment buildEnvironment, String extraArgs, Nullable`1 targetFramework, Boolean addEndpointsHook, String overrideRootDir) in /_/tests/Shared/TemplatesTesting/AspireProject.cs:line 126
at Aspire.Templates.Tests.NewUpAndBuildSupportProjectTemplatesBase.CanNewAndBuildActual(String templateName, String extraTestCreationArgs, TestSdk sdk, TestTargetFramework tfm, String error) in /_/tests/Aspire.Templates.Tests/NewUpAndBuildSupportProjectTemplatesTests.cs:line 37
--- End of stack trace from previous location ---
```
📊 **[View CI Failure Report](https://github.com/microsoft/aspire/issues/12407#issuecomment-4174837102)**
Contributor guide
Assessment
This issue has not been assessed yet.