GetConnectionStringAsync fails for AddConnectionString #7138
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone
Is there an existing issue for this?
Describe the bug
Adding a connection string in the AppHost doesn't allow to retrieve it in integration tests.
Sample:
IResourceBuilder<IResourceWithConnectionString>
is returnedGetConnectionStringAsync
inside tests throws exception, don't find it anymoreif
builder.AddConnectionString
was used for addingIResourceWithConnectionString>
Code:
Insights:
Looking into
DistributedApplicationModel.Resources
of the app, there is noIResourceWithConnectionString
, only aParameterResource
is now in the list:Expected Behavior
GetConnectionStringAsync
returns a connection string in both situationsbuilder.AddConnectionString("openAi")
was calledbuilder.AddAzureOpenAI("openAi")
was calledSteps To Reproduce
No response
Exceptions (if any)
.NET Version info
.NET SDK:
Version: 9.0.102
Commit: cb83cd4923
Workload version: 9.0.100-manifests.d67a1f3e
MSBuild version: 17.12.18+ed8c6aec5
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.102\
Anything else?
The text was updated successfully, but these errors were encountered: