Building MSI in Team Build... (once more)

Heya. I've just installed VS2005 on our TFS in order to build an msi when I do a team build. I added the following to our build script:

<TargetName="AfterCompile">

<ExecCommand="&quot;$(VSINSTALLDIR)\Common7\IDE\devenv&quot;&quot;@(SolutionToBuild)&quot; /build&quot;@(ConfigurationToBuild)&quot; /Project&quot;DDSetup\DDSetup.vdproj&quot;"WorkingDirectory="$(SolutionDir)"/>

</Target>

When msbuild tries to run it, it comes up with this cryptic error message:

C:\DailyBuilds\CompanySolution\CompanySolution Daily Build\BuildType\TFSBuild.proj(144,5): error MSB3073: The command ""\..\..\Common7\IDE\devenv" "C:\DailyBuilds\CompanySolution\CompanySolution Daily Build\BuildType\..\Sources\CompanySolution\CompanySolution.sln" /build "Release|Any CPU" /Project "DDSetup\DDSetup.vdproj"" exited with code 3.

I couldn't find any description for the exit codes for devenv. Can anyone help me out here?

Cheers,

Chris

[2442 byte] By [compilator] at [2008-2-14]
# 1
When you just typt the above command on a normal command prompt from the build type folder- what is the error message that you receive?
Anutthara at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...
# 2
I logged in on the server and typed the above command and it build the MSI successfully. Why can't it build it from the build script?
compilator at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...
# 3

Did you try this out on a normal command prompt and not from the VS Command Prompt? I suspect that the VSINSTALLDIR environment variable is not set in a normal command prompt. In that case you will have to set it as a system wide environment setting and restart the build service before attempting to build. Alternatively in the tfsbuild.proj you can replace the environment variable with the hard coded location to VS.

Can you try these and see if it works?

-Amit

AmitChattopadhyay at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...
# 4
That was the problem. VSINSTALLDIR was not defined, thanks.
compilator at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...

Visual Studio Team System

Site Classified