In this post I am going to walk through the process of setting up a build definition for an ASP.NET web application in Team Foundation Server 2015, which will do this:
- Build solution
- Setup IIS application and application pool
- XCopy all files to the target folder
Setup the parameters. My values:
Solution: $/TfsMigrationTest1/WpfApplication1/WpfApplication1.sln
MSBuild Arguments: /p:OutDir=..\publish\;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False
Add PowerShell task.
Script filesname: $/TfsMigrationTest1/WpfApplication1/TfsBuildTest/Server-Setup/init-server.ps1
Arguments: -AppName $(AppName) -TargetComputers unopsdk573921,unopsdk573922 -PSSessionUser $(PSSessionUser) -PSSessionPassword $(PSSessionPassword) -AppPoolUser $(AppPoolUser) -AppPoolPassword $(AppPoolPassword)
Source: $(Agent.BuildDirectory)\a\drop\WpfApplication1\publish\_PublishedWebsites\TfsBuildTest
Destination: C:\inetpub\wwwroot\$(AppName)