none
msbuild is not recognized as internal or external command

    Question

  • Hi

    I was using the msbuild command in Visual Studio 2008 command prompt succesfuly, now stop working and I cannot find the reason.

    when I run the command I get the message:  'msbuild' is not recognized as internal or external command, operable command or batch file.

    I've checked in C:\Windows\Microsoft.NET\Framework\v2.0.50727 looking for MSBuild.exe and it is in there!

    :(

    Tuesday, April 13, 2010 1:28 PM

Answers

  • Are you sure you are running a VS2008 prompt?

    At a VS2008 prompt you should be able to type the following

    c:\Program Files\Microsoft Visual Studio 9.0\VC>where msbuild

    and get

    c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe

    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe

     

    if you instead get this:

    c:\Program Files\Microsoft Visual Studio 9.0\VC>where msbuild

    INFO: Could not find files for the given pattern(s).

    then you have a problem. 

     

    Have you just installed some new software? You could try re-install the .net framework.

     

    Mike



    Visual Studio ALM MVP
    My Blog | MSBuild Extension Pack | MSBuild Explorer
    Tuesday, April 13, 2010 1:57 PM
    Moderator

All replies

  • Are you sure you are running a VS2008 prompt?

    At a VS2008 prompt you should be able to type the following

    c:\Program Files\Microsoft Visual Studio 9.0\VC>where msbuild

    and get

    c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe

    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe

     

    if you instead get this:

    c:\Program Files\Microsoft Visual Studio 9.0\VC>where msbuild

    INFO: Could not find files for the given pattern(s).

    then you have a problem. 

     

    Have you just installed some new software? You could try re-install the .net framework.

     

    Mike



    Visual Studio ALM MVP
    My Blog | MSBuild Extension Pack | MSBuild Explorer
    Tuesday, April 13, 2010 1:57 PM
    Moderator
  • Yes, I have to specify fullpath where msbuild.exe is, My problem is that I can't use the msbuild shortcut command. I will reinstall my .Net Framework 3.5 .

    thanks

    Monday, April 26, 2010 2:03 PM
  • I am getting the same error and see that certain environmental variables are not set

    the values for the variables shud be the following:

    c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\

    c:\WINDOWS\Microsoft.NET\Framework\v3.5\

    C:\Program Files\Microsoft SDKs\Windows\v6.0A\but these exist on the machine.

    also while typing "c:\Program Files\Microsoft Visual Studio 9.0\VC>where msbuild"

    i am getting the error 'where' is not recognized as an internal or external command batch file or

    Please help

    Thanks

    Ankit


    • Edited by Ankit3111 Thursday, July 25, 2013 2:02 PM i typed 'msbuild' instead of 'where'
    Thursday, July 25, 2013 2:01 PM