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:

<Target Name="AfterCompile">

<Exec Command="&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



Answer this question

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

  • JohnI

    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

  • Hibernating Bear

    That was the problem. VSINSTALLDIR was not defined, thanks.
  • Matt Connolly

    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


  • sdmeijer

    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
  • Building MSI in Team Build... (once more)