Skip to content

[SQLProjects] SqlProjectResource "Waiting" Indefinitely for Its "Running" Dependencies #1013

@FreeAndWithBeer

Description

@FreeAndWithBeer

Describe the bug

I have a SqlServerServerResource with a single SqlServerDatabaseResource to which I'm deploying a SqlProjectResource. Aspire successfully starts the server, adds the database (or performs checks to ensure its health), and both of those resources reach the "Running" State successfully. The SqlProjectResource remains in the "Waiting" State indefinitely.

Console logs from the SqlProjectResource:

Waiting for resource 'mssql' to enter the 'Running' state.
Waiting for resource 'mssql' to become healthy.
Waiting for resource ready to execute for 'mssql'.
Finished waiting for resource 'mssql'.
Waiting for resource 'nss-sql' to enter the 'Running' state.
Waiting for resource 'nss-sql' to become healthy.
Waiting for resource ready to execute for 'nss-sql'.

Regression

Success in CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 13.0.0-beta.456

Steps to reproduce

I apologize that I do not currently have time to develop a minimum repro solution, but below is the Aspire AppHost code that I'm using for my SQL Server related resources.


var sqlDatabase = builder.AddSqlServer("mssql")
    .WithLifetime(ContainerLifetime.Persistent)
    .AddDatabase("nss-sql");

var sqlProject = builder.AddSqlProject<Nss_Sql>("nss-sql-proj")
    .WithSkipWhenDeployed()
    .WithConfigureDacDeployOptions(options => options.CreateNewDatabase = true)
    .WithReference(sqlDatabase)
    .WaitFor(sqlDatabase);

Expected behavior

I expected my SqlProjectResource to start as soon as the SqlServerDatabaseResource is "Running".

Screenshots

No response

IDE and version

Rider

IDE version

Build #RD-253.28294.112, built on November 12, 2025

Nuget packages

Issue in CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 13.0.0 and 13.0.0-beta.462 (appears to be the same commit hash).

Success in CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 13.0.0-beta.456.

Other Aspire.* packages were all 13.0.0 (I've also updated those to 13.0.1 with no effect on this issue).

Additional context

#994

Help us help you

No, just wanted to report this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions