dotnet / project-system

The .NET Project System for Visual Studio
MIT License
969 stars 387 forks source link

Launch profile environment variables are not available for substitution within the same launch profile #8191

Open drewnoakes opened 2 years ago

drewnoakes commented 2 years ago

Stems from https://developercommunity.visualstudio.com/t/Launch-profile-environment-variable-prob/10042433 (AB#1540437)

Steps to reproduce

  1. Create a launch profile
  2. Add an environment variable (e.g. FOO)
  3. Attempt to use that variable in another field such as the command line (e.g. %FOO%)

Expected behaviour

The environment variable is substituted in the other field.

Actual behaviour

No substitution occurs.

image

image

Analysis

Our current environment variable substitution uses the environment variables of devenv.exe only. Those specified in the launch profile itself are not considered.

tmeschter commented 2 years ago

For the moment let's assume this is a regression until we can prove otherwise. If it is not a regression we can consider moving it out.

drewnoakes commented 2 years ago

I believe I tested this in older VS versions and the behaviour was the same, hence marking this as a feature request.