Aspire incorrectly merges Azurite emulator bindings into production manifest, causing Bicep failure #7330
Labels
area-integrations
Issues pertaining to Aspire Integrations packages
azure
Issues associated specifically with scenarios tied to using Azure
Milestone
Is there an existing issue for this?
Describe the bug
Environment:
When using Aspire with Azurite in development (
RunAsEmulator
) and Azure Storage in production (azd provision
), Aspire incorrectly merges emulator bindings into the production manifest and Bicep templates.This results in an invalid connection string containing
bindings.blob.host
, causing Bicep generation to fail with:ERROR: generating bicep from manifest: evaluating value for ConnectionStrings__blobs: evaluating connection string for blobs: unsupported property referenced in binding expression: bindings.blob.host for azure.bicep.v0
What I Expected
bindings.blob.host
.What Actually Happens
bindings.blob.host
to be present in production.I have thoroughly reviewed my setup and compared it with other Aspire projects that use a similar configuration without issues. Despite my efforts, I have been unable to find any relevant documentation or discussions about this specific error. Given the lack of available solutions and my unsuccessful attempts at resolving the issue, I am unsure if this is a misconfiguration on my part or a potential bug. Any guidance or clarification would be greatly appreciated.
Below is the generated Aspire.NET manifest and Bicep file produced when running
dotnet run --launch-profile manifest
.aspire-manifest.json
Expected Behavior
bindings.blob.host
.Actual Behavior
bindings.blob.host
reference and resulting deployment failures.Workarounds Attempted
Separate resource names for dev vs. prod.
Manual cleanup of old artifacts and caches.
Explicit environment checks to ensure CI is not recognized
Steps To Reproduce
My setup is extremely simple. I simply did the following:
.NET Aspire
project with the following code in AppHost:azd init
andazd provision
And that gave me the following error:
generating bicep from manifest: evaluating value for ConnectionStrings__blobs: evaluating connection string for blobs: unsupported property referenced in binding expression: bindings.blob.host for azure.bicep.v0
Exceptions (if any)
generating bicep from manifest: evaluating value for ConnectionStrings__blobs: evaluating connection string for blobs: unsupported property referenced in binding expression: bindings.blob.host for azure.bicep.v0
.NET Version info
.NET SDK:
Version: 9.0.102
Commit: cb83cd4923
Workload version: 9.0.100-manifests.43af17c7
MSBuild version: 17.12.18+ed8c6aec5
Runtime Environment:
OS Name: Mac OS X
OS Version: 15.2
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.102/
.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.1
Architecture: arm64
Commit: c8acea2262
.NET SDKs installed:
9.0.102 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Anything else?
No response
The text was updated successfully, but these errors were encountered: