Open mdrakiburrahman opened 2 months ago
If the maintainers of Aspire are not familiar with Visual Studio Containers, and would like me to create a simple hello-world repro app, please let me know, I can create something and link it here.
Else, if you're familiar, you should be able to repro this in 5 minutes, after adding the Visual Studio Containers project into the Aspire Weather Web App Sample.
Please also feel free to ping me (I'm a Microsoft employee on the SQL Server team - Alias mdrrahman
) - I can show a quick repro, if that helps.
I'm seeing exactly the same problem on Windows.
Don't run the apphost inside of a container, it's unclear how that is beneficial as that is essentially tooling code that orchestrates your application. What are you trying to accomplish here?
My issue was automatically resolved by upgrading Visual Studio
Is there an existing issue for this?
Describe the bug
Issue
Visual Studio Containers - AKA where your build from Windows is transferred into a Linux container, doesn't work with Aspire.
You get this:
And in the Linux Debug container:
I think it's because of how the assembly metadata is used by Aspire to figure out the dcp path.
I have dcp installed in the Linux container:
But the issue is, Aspire is looking at the Windows path, because that's where Visual Studio Containers builds things.
Repro
I couldn't find anyone that has tried this, so I gave it a go.
launchSettings.json
My csproj (using Aspire 8.1.0):
Going through the Aspire code for 8.1.0, it looks like passing args for CLIPath and DashboardPath isn't actually used in DCPOptions:
https://github.com/dotnet/aspire/blob/d304c5f6f15bcd4f34f1841b33870cfab88e6937/src/Aspire.Hosting/Dcp/DcpOptions.cs#L115
I tried to add a hack to my CSPROJ, to override the assembly values:
But that didn't work either.
It looks like this PR:
https://github.com/dotnet/aspire/pull/5082
From @mitchdenny adds the Dashboard Path as an args.
But this isn't available as a Nuget release yet.
Expected Behavior
Visual Studio Containers, an awesome extension for debugging your code in a Docker Container, doesn't work with Aspire.
It'd be great if it did, because Visual Studio Containers solves a very real problem (debugging your code in a close-to-production Linux Container runtime).
Steps To Reproduce
Please try to create a simple project with Visual Studio Containers and try to make it work with the latest Aspire Nuget package. You should hit what I hit.
Exceptions (if any)
.NET Version info
This is inside my Docker container:
Anything else?
No response