Aspire image complications in corporate Azure Virtual Desktop #13629
Unanswered
AlexPrice17
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
@danegsta - does this sound like an issue with container files? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@AlexPrice17 a few quick questions:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I had the perfect use case to demonstrate Aspire to my colleagues at work who haven't used Aspire before. In simple terms I wanted to show how Aspire can easily orchestrate the creation of Azure services that we often use such as ServiceBus or EventHubs.
I immediately created a new aspire-starter project using the latest Aspire.ProjectTemplates with .NET 10 and Aspire 13.1.0 on my company issued Azure Virtual Desktop (Windows 10). I use this to complete my daily development tasks. It has the latest version of Docker Desktop along with .NET 10 and Aspire 13.1.0.
Based on the below code, which perfectly matches the Microsoft documentation, you would expect a ServiceBus emulator to be spun up with the custom queue name "test-queue". Once the container was healthy I noticed my configuration was not applied and instead the standard Config.json templated queues (queue.1) and topics (topic.1) were created, weird!! It matches the following GitHub issue.
I then tried to apply my own configuration file to the ServiceBus emulator (which works with docker compose!), same undesired outcome. I began to test other containers such as the Azure EventHub emulator and this also experienced the same issue where the standard image configuration was being applied.
To ensure my sanity was still in tact I went to my personal non-work related desktop and low and behold the above code works like a dream and I get the desired outcome.
I can use
docker compose -f <PathToDockerComposeFile> up -dto create the image with the desired queues based off custom config on my work machine, and add these to aspire usingbuilder.AddConnectionString()but this circumvents the beauty of Aspire.After a day or so of testing on my company machine, and partially through a stroke of luck, I decided to try and attach Aspire to an older .NET 9.0 solution and amazingly it worked with Aspire v9.3.1 (matching versions for the Aspire service bus package). In this deprecated version Aspire is able to successfully create the ServiceBus emulator with the queue configuration I desire based on the above code. This version also works for the EventHub emulator on my work machine. I tried to gradually increase the Aspire version but I found that v9.3.1 was the only working version.
I suppose my long winded question is, how would I begin to troubleshoot the weird Aspire quirks I am seeing on my company machine, and how can I fix this issue? I am really keen to use Aspire as I think it would significantly improve my day to day development, but at the moment it's a little tricky to understand why the deprecated version v9.3.1 is the only version to work. it can't be a coincidence that multiple Microsoft images are having the same issue with the custom configuration in code not being applied.
Steps to reproduce
mkdir test; cdtest;
dotnet new install Aspire.ProjectTemplates
dotnet new aspire-starter
dotnet dev-certs https --trust
aspire update --self
aspire update
aspire add azure-servicebus
Update the
AppHost.csto add the ServiceBus emulator.Run the app host and observe the configuration.
.NET SDK's
9.0.308
10.0.101
Windows
Version 22H2 (OS Build 19045.6691)
Beta Was this translation helpful? Give feedback.
All reactions