Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I went to Environment Variables in the Advanced tab of System Properties and added a new System variable like this:

name: msbuild35
value: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe

but when I try to run msbuild35 I still get the 'not recognized...' message

What am I missing?

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

You need to add ;C:\Windows\Microsoft.NET\Framework\v3.5\ to the end of the PATH environment variable.

share|improve this answer
    
Hmm, still no luck. Could it be a permissions issue? I even tried rebooting to no avail. Also just tried running CMD as admin, no dice. –  ioSamurai Mar 14 '11 at 19:02
2  
are you typing msbuild35 or msbuild? The program is called msbuild.exe so you should be typing msbuild. You could use your msbuild35 environment variable by using: %msbuild35% if you really wanted. –  Majenko Mar 14 '11 at 19:10
    
I hope windows will detect the env variable without restarting.. :-/ –  Bibhas Mar 14 '11 at 20:37
    
BINGO! Thanks. –  ioSamurai Mar 14 '11 at 20:38
    
How to use such Variables in Windows PowerShell 2 ? Calling %Var_Name% throws an error... –  V-Light Aug 30 '11 at 19:12
add comment

Open the Environment Variables dialog from the Advanced tab of System Properties again and do the following.

  1. Delete msbuild35 that you created earlier; it is not necessary
  2. Look for the Path variable in both sections (user and system)
  3. If there is one in the user section, please let us know since that is unusual
  4. Select the Path variable from the System Variables section and click Edit
  5. Look for C:\Windows\Microsoft.NET\Framework\v3.5 in the value field of the dialog (you may want to copy the contents of the field to Notepad to make it easier to examine)
  6. Verify that there is a semicolon before it, and if it is not the last item, after it as well
  7. Click OK, OK, OK
  8. Reboot
  9. Open a command prompt and type msbuild
  10. Let us know if it still does not work
share|improve this answer
    
Rebooting is not necessary if updates are done through the GUI. It will be enough to open a new Command Prompt through Explorer (e.g., Start Menu). –  grawity Mar 14 '11 at 22:07
1  
Not necessarily. Using the GUI does indeed send the WM_SETTINGCHANGE message, but that only works with normal environments. If there are any variables that include other variables, then suddenly variables stop getting expanded and a reboot is required (but only for users, ie, opening an elevated command-prompt still expands). –  Synetech Mar 14 '11 at 22:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.