13.1.0 can no longer resolve cosmosDb connection string from resource
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
I have an app that connects with CosmosDb.
It declares cosmosDb resources:
```csharp
ar cosmosDbAccount = builder.AddAzureCosmosDB(name).WithAccessKeyAuthentication(); // Using access key to facilitate EF core migrations.
var cosmosDbDatabase = cosmosDbAccount.AddCosmosDatabase(Config.CosmosDbDatabaseResourceName, Config.CosmosDbDatabaseName);
```
And my project has a reference to the cosmosDbAccount (though I've tried referencing 'cosmosDbDatabase' as well).
This was working fine with Aspire 13.0.2. After updating to 13.1.0, my cosmos db resource appears fine on the dashboard (can see the connection string), but my projects referencing it fail to start, the console logs seem to simply show them stuck waiting:
> Waiting for value for connection string from resource 'cosmosDb'
> Waiting for value from Aspire.Hosting.ApplicationModel.ReferenceExpression.
There's no other detail or output anywhere.
### Expected Behavior
Connection to cosmosDb should continue to work as before in 13.0.2.
### Steps To Reproduce
It's just an aspire project with one web project referencing a cosmosdb resource as described above. I don't know if it relates to me using 'WithAccessKeyAuthentication' and something getting more strict/locked out on that front, but I couldn't see mention of anything in breaking changes.
### Exceptions (if any)
Minimal output from Aspire, just what I've described above.
### .NET Version info
.NET SDK:
Version: 10.0.101
Commit: fad253f51b
Workload version: 10.0.101
MSBuild version: 18.0.6+fad253f51
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.101\
.NET workloads installed:
[android]
Installation Source: SDK 10.0.100, VS 18.1.11312.151, VS 18.3.11312.210
Manifest Version: 36.1.2/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.android\36.1.2\WorkloadManifest.json
Install Type: Msi
[ios]
Installation Source: SDK 10.0.100, VS 18.1.11312.151, VS 18.3.11312.210
Manifest Version: 26.1.10502/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.ios\26.1.10502\WorkloadManifest.json
Install Type: Msi
[maccatalyst]
Installation Source: SDK 10.0.100, VS 18.1.11312.151, VS 18.3.11312.210
Manifest Version: 26.1.10502/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.maccatalyst\26.1.10502\WorkloadManifest.json
Install Type: Msi
[maui-windows]
Installation Source: SDK 10.0.100, VS 18.1.11312.151, VS 18.3.11312.210
Manifest Version: 10.0.1/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.maui\10.0.1\WorkloadManifest.json
Install Type: Msi
[wasm-tools]
Installation Source: SDK 10.0.100, VS 18.1.11312.151, VS 18.3.11312.210
Manifest Version: 10.0.101/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.workload.mono.toolchain.current\10.0.101\WorkloadManifest.json
Install Type: Msi
[wasm-tools-net9]
Installation Source: SDK 10.0.100, VS 18.3.11312.210
Manifest Version: 10.0.101/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.workload.mono.toolchain.net9\10.0.101\WorkloadManifest.json
Install Type: Msi
Configured to use workload sets when installing new manifests.
Host:
Version: 10.0.1
Architecture: x64
Commit: fad253f51b
.NET SDKs installed:
9.0.308 [C:\Program Files\dotnet\sdk]
10.0.101 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
### Anything else?
.NET 10
Aspire 13.1.0
VS 2026 insiders
Contributor guide
Assessment
This issue has not been assessed yet.