EditDescription
This recipe provides the configuration for deploy a website to the Build Server IIS after completed a Build.
EditSoftware Requisites
Install Visual Studio 2005 Web Deployment Projects on Build Server
Download:
Visual Studio 2005 Web Deployment ProjectsOr
Install Visual Studio 2008 Web Deployment Projects on Build Server
Download:
Visual Studio 2008 Web Deployment ProjectsUnZip PSTools on Build Server at "c:\PSTools"
Download:
PSToolsEditOther Requisites
Shared Folder on the Target Server
Example: \\TargetServer\BuildDeploy\
Administrator Rights for the Build Server Account on the Target Server
EditPreparation
1.- Add a Web Deployment Project to your Web Site.
Reference:
VS 2005 Web Deployment Projects2.- Add a Web Setup Proyect.
Configure in the File System Editor, Add a new "Project Output" under the folder "Web Applicator Folder" and select as project the "Web Deployment Project" created before.
3.- Create a new Build Type and make sure that run under "Release|Mixed Platforms".
4.- In the "Configuration Manager" window, create a new configuration named "Deploy".
Select all the Projects for Build including the Web Deploy Project and the Web Setup Projects.
5.- Run the Build Type.
At this point the build should succeed with no problems.
EditUsage
Open the "TFSBuild.proj" of the Build Type and add the script at the bottom of the file, before the "</Project>" tag.
EditScript
<Target Name="AfterCompile">
<Exec Command=""$(VSINSTALLDIR)\Common7\IDE\devenv" "$(SolutionRoot)\Application\Application.sln" /build "Deploy|Mixed Platforms"" />
<Copy SourceFiles="$(SolutionRoot)\Application\WebSetupProject\Deploy\WebSetupProject.msi" DestinationFolder="$(OutDir)" />
<Copy SourceFiles="$(OutDir)\WebSetupProject.msi" DestinationFolder="\\TargetServer\BuildDeploy\" />
<Exec Command=""c:\PSTools\psexec" \\TargetServer /accepteula MSIExec /x "SETUP-PRODUCT-CODE" /qn" IgnoreExitCode="true" ContinueOnError="true" />
<Exec Command=""c:\PSTools\psexec" \\TargetServer /accepteula MSIExec /i "\\TargetServer\BuildDeploy\WebSetupProject.msi" /qn" />
</Target>
EditSource
This build recipe was made by Juan José Karam -
The Sharp Code.
EditNotes
If you have any problem or questions about this Build Recipe you can post me a comment at
The Sharp Code.
EditDisclaimer
This build recipe is provided "AS IS" without warranty of any kind.