To build and deploy autohosted / SharePoint-hosted apps for SharePoint:
- Check in the foldrs and the files from the project into the root of your source control team project. Your source control project folder structure should look like the following after check-in:
- Update Parameters.ps1 as needed to specify your SharePoint URL and the account. Check the file into source control after modification.
- Create a new build definition using OfficeToolsAppTemplate.xaml.
- Go to the Process tab of the build definition, expand the Misc category in “Build process parameters”, and then select SharePointAppDeploy.ps1 as the deployment script for this build template:
- Save the build definition, and you are ready to go.
Note: After an autohosted / SharePoint-hosted app is deployed, you’ll have to go to the app info page and trust it before you can successfully
navigate to the app page.
To build provider-hosted apps for SharePoint or apps for Office:
instructions to configure your build agent so that TFS build server can remotely deploy the web application in the SharePoint project to your web server.
In your provider-hosted app for SharePoint project, right-click the project in Solution Explorer and select Publish command. After following the instructions in the Publish wizard, a publish profile (.pubxml)
is generated in your web project after you finish all the steps in the wizard. Check that profile file into your source control team project.
Follow all the steps in the section “To build and deploy autohosted / SharePoint-hosted apps for SharePoint” above to create the proper layout of your team project and the build definition. For
apps for Office, use the following scripts as the deployment script in the build template:
Content / task pane apps: ContentAndTaskPaneDeploy.ps1
Mail apps: MailAppDeploy.ps1
In the build definition, update the MSBuildArguments parameter (under Advanced category) to
/p:ActivePublishProfile=”<YourPublishProfileName>”, and then save the build definition:
Save the build definition and you are ready to go.
To build SharePoint Farm / Sandboxed solutions: