I am having a problem on my build server(2003) with msbuild. I have narrowed down the issue to the exec task in the csproj file,which I have extracted into a very simple csproj(below), and still no joy, see the 'C:\Documents' error. This all works with no problems on my local machine.
I think there is some issue with an environment variable, but I cant figure it. Any advice?
Input
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="BeforeBuild">
<Exec Command="echo hello world" />
</Target>
</Project>
MSBuild output
D:\cc.net working\source\WebBase>msbuild ExecIssue.csproj Microsoft (R) Build Engine Version 4.0.30319.1 [Microsoft .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation 2007. All rights reserved. Build started 11/10/2010 12:37:50. Project "D:\cc.net working\source\WebBase\ExecIssue.csproj" on node 1 (default t argets). BeforeBuild: echo hello world 'C:\Documents' is not recognized as an internal or external command, operable program or batch file. D:\cc.net working\source\WebBase\ExecIssue.csproj(5,4): error MSB3073: The comma nd "echo hello world" exited with code 1. Done Building Project "D:\cc.net working\source\WebBase\ExecIssue.csproj" (defau lt targets) -- FAILED. Build FAILED. "D:\cc.net working\source\WebBase\ExecIssue.csproj" (default target) (1) -> (BeforeBuild target) -> D:\cc.net working\source\WebBase\ExecIssue.csproj(5,4): error MSB3073: The com mand "echo hello world" exited with code 1. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.17