.NET Framework Developer Center > .NET Development Forums > MSBuild > Command Line Error with Msbuild
Ask a questionAsk a question
 

AnswerCommand Line Error with Msbuild

  • Sunday, November 01, 2009 10:31 PMcapt edgar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi there

    We have Vb2005 solution for which we do the build on the IDE. So when we open the solution and select build, the build functionality works fine. Although when you open a command prompt and type msbuild <solution name>.sln, i get a strange message saying msbuild is not recognised as an internal or external command

    any idea?

Answers

  • Monday, November 02, 2009 11:56 AMACKH Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    MSBuild.exe is obviously not part of your PATH variable and can therefore not be found. Either add it to the PATH variable or use the fully qualified path "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" or "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe".
    • Marked As Answer bycapt edgar Monday, November 02, 2009 12:43 PM
    •  

All Replies

  • Monday, November 02, 2009 11:56 AMACKH Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    MSBuild.exe is obviously not part of your PATH variable and can therefore not be found. Either add it to the PATH variable or use the fully qualified path "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe" or "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe".
    • Marked As Answer bycapt edgar Monday, November 02, 2009 12:43 PM
    •  
  • Monday, November 02, 2009 12:44 PMcapt edgar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    thnaks ackh