Creating a stand alone setup.exe/msi wasn't as easy for me as it should have been. Following Microsoft's suggestion of adding the .vdproj file to my "AfterCompile" target in my TFSBuild.proj file did not work; I got a compile error.
<Project> ... <Target Name="AfterCompile"> <Exec Command=""C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv""$(SolutionRoot)\HelloWorldTest\HelloWorldTestInstaller\HelloWorldTestInstaller.vdproj /Build "Debug|Any CPU""/> <Copy SourceFiles="$(SolutionRoot)\HelloWorldTest\HelloWorldTestInstaller\Debug\HelloWorldTestInstaller.msi" DestinationFolder="$(OutDir)" /> <Copy SourceFiles="$(SolutionRoot)\HelloWorldTest\HelloWorldTestInstaller\Debug\setup.exe" DestinationFolder="$(OutDir)" /> </Target> </Project>
What I ended up doing was replacing the .vdproj file with the entire .sln file. Then I copied the setup.exe and .msi files out to the specified drop directory.
<Project> ... <Target Name="AfterCompile"> <Exec Command="del "$(OutDir)*" /q" /> <Exec Command=""C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv" "$(SolutionRoot)\Project.sln" /Build "Debug|Any CPU"" /> <Copy SourceFiles="$(SolutionRoot)\ProjectSetup.msi" DestinationFolder="$(OutDir)" /> <Copy SourceFiles="$(SolutionRoot)\setup.exe" DestinationFolder="$(OutDir)" /> </Target> </Project>
No comments:
Post a Comment