Question: I'm trying to setup .NET (C#) build from the command line. What is the list of environment variables that I need to set up in the MSDOS prompt before I can run `MSBuild.exe` from the command line?

The path to `MSBuild` executable would be the most obvious example. I cannot rely on setting variables from `MyComputer -> Properties -> Advanced -> Enviroment Variables` so I really need a full list if such list exists.

P.S. The build needs to be automated (command line), and I'm not using Visual Studio but building with .NET Framework (v3.5) only.

Answer: 
In the Visual Studio installation there is the batch file, `vsvars32.bat`, that will set the environment variables. If you want the list, then record the full list of environment variables before and after calling it, e.g. in a command line window: 

```
set
"D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
set

```

And find the difference between the two lists.

(Your path to `vsvars32.bat` may vary...)
There is no need for an environment variable. Just make sure you have this registry key set (note it is for 64-bit Visual Studio; use a slightly different path for Visual Studio 32-bit):

```
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\4.0]

```

"MSBuildOverrideTasksPath"="C:\windows\Microsoft.NET\Framework64\v4.0.30319\"

Then you can just type 

```
msbuild

```

at the command prompt.