26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4. Select the appropriate configuration.<br />

5. Click the Platform drop-down list and select Mixed as the platform.<br />

6. Specify the location information for the build type.<br />

7. Choose the tests and code analysis rules to run.<br />

8. Save the build type by selecting Finish.<br />

You will find the compiled binaries in the drop location under<br />

{BuildType}\{Configuration Name}\{Platform}\_PublishedWebsites<br />

Deploying a Web application to Internet Information Services (IIS) is not supported<br />

natively by <strong>Team</strong> Build. If you want to deploy the application to IIS as part of the team<br />

build, you have two choices: you can: add a custom step to the build type, or you can use<br />

a Web Deployment Project.<br />

If you are at the start of a <strong>Team</strong> Project, examine the Web Deployment Project option to<br />

see if you can use this option in your development. If you already have existing Web<br />

sites, using Web Deployment Projects may disrupt application development. Consider<br />

using an MSBuild post-build step instead. In both cases, you must ensure that the service<br />

account used to run the build is a member of the local administrators group to allow it to<br />

create a virtual directory in IIS.<br />

To use a post build step to deploy your Web application<br />

1. Download the SDC Tasks Library from Codeplex at<br />

http://www.codeplex.com/sdctasks<br />

2. Check out the <strong>Team</strong> Build type that you are going to use to deploy the Web<br />

application.<br />

3. Extract the file Microsoft.Sdc.Tasks.dll from the downloaded zip file into the folder<br />

where you checked out the build type.<br />

4. Add the DLL to source control and check it in.<br />

5. Amend the TFSBuild.proj file so that the build copies the files to the correct<br />

directory, and then create that directory as a virtual directory as follows:<br />

a. Add a element specifying the location of the compiled<br />

Web application:<br />

<br />

$(SolutionRoot)\..\Binaries\.NET\Release\_PublishedWebSites\MyWeb<br />

Site<br />

<br />

b. Add two UsingTask elements that add a references to the<br />

CreateVirtualDirectory and DeleteVirtualDirectory tasks:<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!