Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a list of Visual Studio environment variables? [duplicate]

Possible Duplicate:
Link to all Visual Studio $ variables

Visual Studio has a lot of environment variables like $(TargetFileName) but I can't seem to find a list of all of them on MSDN or via Google.

Does such a list exist?

NOTE: See the top answer for the duplicate question (link above) for a link to a list on MSDN.

like image 696
Dana Robinson Avatar asked Sep 22 '09 15:09

Dana Robinson


People also ask

Where are Visual Studio Environment Variables stored?

In Visual Studio 2019 right-click your project, choose Properties . In the project properties window, select the Debug tab. Then, under Environment variables change the value of your environment from Development to Production or other environments.

How do I view Environment Variables in Visual Studio?

In Visual Studio, we can set ASPNETCORE_ENVIRONMENT in the debug tab of project properties. Open project properties by right clicking on the project in the solution explorer and select Properties. This will open properties page. Click on Debug tab and you will see Environment Variables as shown below.

Where are all Environment Variables stored?

Machine environment variables are stored or retrieved from the following registry location: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment . Process environment variables are generated dynamically every time a user logs in to the device and are restricted to a single process.

What is the .ENV file?

The . env file contains the individual user environment variables that override the variables set in the /etc/environment file. You can customize your environment variables as desired by modifying your . env file.


2 Answers

In most places where you can use those, there's a "Macros" button or similar, which shows all available macros and the current value of them. For example, go to the PostBuild event editor to find the list.

Edit: I just checked. There's a list in MSDN.

like image 159
OregonGhost Avatar answered Sep 22 '22 20:09

OregonGhost


You can get the list of available environment variables directly within Visual Studio 2010 with the following steps:

  1. in Visual Studio env, right click on your project
  2. properties
  3. configuration properties / C++ / General
  4. for ex. go into Additional Include directories
  5. 'dropdown' Edit
  6. Macros

There you will find a complete list of available macros with their values set according to your settings. This can be very useful when debugging or selecting the right macro for your project settings.

like image 21
fduff Avatar answered Sep 24 '22 20:09

fduff