visual studio 2010 - How to execute 'msbuild' command from a batch file -
i create batch file make builds vs project in on click. days following steps:
- opens cmd console administrador
- go path of project/solution (using cd.., cd commands)
write following command make build:
msbuild mysolution.sln /p:configuration=debug
as commented before, i'd make process in 1 click. so, i'm trying create .bat file it.
this code of batch file:
set location="c:\mypath\..\myfoldersolution" set pathmsbuild = "c:\windows\microsoft.net\framework64\v4.0.30319\msbuild.exe" @echo off cls call %pathmsbuild% cd %location% msbuild.exe "lucre.sln" /p:configuration=debug pause
however, when try execute batch file following error: 'msbuild' not recognized internal or external command, operable program or batch file.
any clue or know if possible , if so, how appreciate
regards!
you're not in right directory, need cd directory msbuild in. try this:
set pathmsbuild="c:\windows\microsoft.net\framework64\v4.0.30319\" @echo off cls cd %pathmsbuild% msbuild.exe "c:\mypath\..\myfoldersolution\lucre.sln" /p:configuration=debug pause
or add msbuild directory path, , skip lines set , cd.
Comments
Post a Comment