Open GabrielLetourneau opened 2 months ago
@karolz-ms
@tmeschter any thoughts? Could be a limit on the request size for the IDE endpoint?
@GabrielLetourneau any chance of using a temp file for passing this information?
@GabrielLetourneau any chance of using a temp file for passing this information?
My current workaround is to unset those big variables I have in a startcode.sh
script, as my .NET projects don’t really need them. It’s just an inconvenience that I have to do that, and I can guess many people won’t know or think about doing that.
I’m using a Nix shell for my project, automated with direnv. The way these tools isolate the shell is essentially by adding and augmenting a bunch of environment variables. Several of those are PATH
-type lists of file system references. For instance, I have a 17k characters long PYTHONPATH
that’s only there because of me having the Azure CLI (with a few extensions) installed by my flake.nix
. My PATH
is over 5K char.
Most of those things are not needed by my applicative code per se, some of them eventually could be, in any case it’s much more practical to have them up at all time when I’m developing/devopsing. Unused environment variables shouldn’t cause problems.
A few figures that might be useful:
-bash: /mnt/c/Users/gabriel.letourneau/AppData/Local/Programs/Microsoft VS Code/bin/code: Argument list too long
@GabrielLetourneau thank you, that helps a lot
@davidfowl @mitchdenny DCP has the ability to omit the ambient environment variables when starting an Executable, which would help here, but this ability is not currently exposed via the Aspire app model APIs. Something to consider.
Is there an existing issue for this?
Describe the bug
In WSL, when I try to debug the Aspire starter project in a VS Code that I launched with a big (30k characters) environment variable in context, projects fail to start.
I get the following in VS Code debug console:
Dashboard works. Same project runs fine when launched with
dotnet run
.Expected Behavior
VS Code debugging of project resource should work even when long environment variables are set.
Steps To Reproduce
In WSL:
… then press F5.
Exceptions (if any)
No response
.NET Version info
.NET SDK: Version: 8.0.108 Commit: 665a05cea7 Workload version: 8.0.100-manifests.a22b3d1f
Runtime Environment: OS Name: ubuntu OS Version: 24.04 OS Platform: Linux RID: ubuntu.24.04-x64 Base Path: /usr/lib/dotnet/sdk/8.0.108/
.NET workloads installed: Workload version: 8.0.100-manifests.a22b3d1f [aspire] Installation Source: SDK 8.0.100 Manifest Version: 8.1.0/8.0.100 Manifest Path: /home/gabriel/.dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.1.0/WorkloadManifest.json Install Type: FileBased
Host: Version: 8.0.8 Architecture: x64 Commit: 08338fcaa5
.NET SDKs installed: 8.0.108 [/usr/lib/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 8.0.8 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.8 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Other architectures found: None
Environment variables: Not set
global.json file: Not found
Anything else?
ms-dotnettools.csdevkit: v1.9.55 ms-dotnettools.csharp: v2.39.29