2
我正在使用Team Build(2010)通過Exec任務調用msbuild腳本,該任務調用批處理文件,該文件又調用msbuild。就像這樣:如何從團隊構建中的msbuild批處理文件調用msbuild?
<Exec Command="BatchFileThatCallsMSBuild.bat" />
當然批處理文件做了一堆其他垃圾,或者我只是使用MSBuild任務。
問題是,當批處理文件試圖調用msbuild時,它找不到它。
'msbuild' is not recognized as an internal or external command, operable program or batch file.
如何獲得在exec任務中設置的必要環境?
我試圖改變命令:
<Exec Command="%22$(VS100COMNTOOLS)..\..\VC\vcvarsall.bat%22&BatchFileThatCallsMSBuild.bat" />
,但沒有骰子,依然的MSBuild找不到。
你是否指定批處理文件中msbuild可執行文件的完整路徑,還是依賴於相對路徑(並不保證它是你期望的)? – David 2011-12-16 03:02:08