Engine: Using MSBuild and Team Foundation



Similar documents
Microsoft s Team Foundation Server (TFS) Canute Magalhaes Richland County (IT) SYSTEMS ANALYST / PROJECT LEAD 1

Administering Team Foundation Server 2013

We ( have extensive experience in enterprise and system architectures, system engineering, project management, and

Capture Pro Software FTP Server System Output

Administering the Web Server (IIS) Role of Windows Server

Administering the Web Server (IIS) Role of Windows Server 10972B; 5 Days

Reference and Troubleshooting: FTP, IIS, and Firewall Information

FTP, IIS, and Firewall Reference and Troubleshooting

Microsoft. Microsoft SQL Server Integration Services. Wee-Hyong Tok. Rakesh Parida Matt Masson. Xiaoning Ding. Kaarthik Sivashanmugam

estpassport Bessere Qualität, bessere Dienstleistungen!

Windows PowerShell Cookbook

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

10972B: Administering the Web Server (IIS) Role of Windows Server

Hands-On Lab. Web Development in Visual Studio Lab version: Last updated: 12/10/2010. Page 1

Setting Up Resources in VMware Identity Manager

Microsoft Windows PowerShell v2 For Administrators

2012 Nolio Ltd. All rights reserved

VB.NET - WEB PROGRAMMING

CMB 207 1I Citrix XenApp and XenDesktop Fast Track

Programming with the Microsoft.NET Framework Using Microsoft Visual Studio 2005 (VB)

DataFlux Data Management Server 2.6

Composite C1 Load Balancing - Setup Guide

DottsConnected SHAREPOINT 2010 ADMIN TRAINING. Exercise 1: Create Dedicated Service Accounts in Active Directory

Ipswitch Client Installation Guide

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Enterprise Service Bus

ALM Solutions using Visual Studio TFS 2013 ALMI13; 5 Days, Instructor-led

Pulse Secure Client. Customization Developer Guide. Product Release 5.1. Document Revision 1.0. Published:

MarkLogic Server. Connector for SharePoint Administrator s Guide. MarkLogic 8 February, 2015

Expanded contents. Section 1. Chapter 2. The essence off ASP.NET web programming. An introduction to ASP.NET web programming

Migration Guide. Sentinel HASP to Sentinel LDK

Michael Noel. Colin Spence. SharePoint UNLEASHED. 800 East 96th Street, Indianapolis, Indiana USA

Grid Computing in SAS 9.4 Third Edition

Configuring and Troubleshooting Internet Information Services in Windows Server 2008

"Charting the Course to Your Success!" MOC A Understanding and Administering Windows HPC Server Course Summary

Jitterbit Technical Overview : Microsoft Dynamics CRM


SAS 9.4 Logging. Configuration and Programming Reference Second Edition. SAS Documentation

Version Devolutions inc.

Pro SQL Server Reporting Services. Third Edition. mm m. Brian McDonald. Shawn McGehee. Rodney Landrum. Apress*

Deploying Web Applications in Enterprise Scenarios

Moving the Web Security Log Database

Deploying Microsoft Operations Manager with the BIG-IP system and icontrol

SAS 9.4 Intelligence Platform: Migration Guide, Second Edition

User Guide Release Management for Visual Studio 2013

EMC Documentum Connector for Microsoft SharePoint

MOC 10964C: Cloud and Datacenter Monitoring with System Center Operations Manager

Capture Pro Software FTP Server Output Format

2933A: Developing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006

Metastorm BPM Interwoven Integration. Process Mapping solutions. Metastorm BPM Interwoven Integration. Introduction. The solution

Authoring for System Center 2012 Operations Manager

CMB-207-1I Citrix Desktop Virtualization Fast Track

Windows Azure Data Services (basics) 55093A; 3 Days

Release Notes for version 2.5

GLOBAL CONSULTING SERVICES TOOLS FOR WEBMETHODS Software AG. All rights reserved. For internal use only

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

EMC Documentum Composer

SQL Server Integration Services. Design Patterns. Andy Leonard. Matt Masson Tim Mitchell. Jessica M. Moss. Michelle Ufford

Cross platform Migration of SAS BI Environment: Tips and Tricks

Continuous integration for databases using Red Gate tools

Implementing and Administering an Enterprise SharePoint Environment

SQL Server 2008 Administration

SOFTWARE TESTING TRAINING COURSES CONTENTS

Upgrading a Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 Database to Microsoft Dynamics NAV 2015

System Administration Training Guide. S100 Installation and Site Management

Professional SharePoint Server 2010 Administration

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0

SAS 9.3 Intelligence Platform

Deployment guide for Microsoft SharePoint Server 2010

FDA Medication Guides Project

Unicenter Desktop DNA r11

"Charting the Course to Your Success!" MOC B Configuring and Administering Microsoft SharePoint Course Summary

AppFabric. Pro Windows Server. Stephen Kaufman. Danny Garber. Apress. INFORMATIONSBIBLIOTHbK TECHNISCHE. U N! V En SIT AT S R!

Installation and Configuration Guide

SAS IT Resource Management 3.2

Online Backup Linux Client User Manual

SharePoint List Synchronizer for Excel. Documentation

Database Administration

BarTender Integration Methods. Integrating BarTender s Printing and Design Functionality with Your Custom Application WHITE PAPER

Braindumps.C questions

multiple placeholders bound to one definition, 158 page approval not match author/editor rights, 157 problems with, 156 troubleshooting,


SAS 9.3 Logging: Configuration and Programming Reference

Implementing and Managing Microsoft Desktop Virtualization en

Skynax. Mobility Management System. System Manual

The Great Office 365 Adventure

Deploying Cisco Unified Contact Center Express Volume 1

Citrix Desktop Virtualization Fast Track

Scheduling in SAS 9.4 Second Edition

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

v Devolutions inc.

MCT USE ONLY. STUDENT USE PROHIBITED

DataFlux Data Management Server 2.5

GOA365: The Great Office 365 Adventure

Capitalware's Commercial, Licensed As Free & Open Source Products Explained

APPLICATION NOTE 1740 White Paper 6: 1-Wire Drivers Installation Guide for Windows

Office and SharePoint

Scheduling in SAS 9.3

SAP Data Services 4.X. An Enterprise Information management Solution

Transcription:

Microsoft Inside the Microsoft* Build Engine: Using MSBuild and Team Foundation Build, Second Edition Sayed Hashimi William Bartholomew

Table of Contents Foreword x'x Introduction x*1 Part I Overview 1 MSBuild Quick Start 3 Project File Details 3 Properties and Targets 4 Items 9 Item Metadata H Simple Conditions 15 Default/Initial Targets 17 MSBuild.exe Command-Line Usage 18 Extending the Build Process 21 2 MSBuild Deep Dive, Part 1 23 Properties 24 Environment Variables 26 Reserved Properties 27 Command-Line Properties 30 Dynamic Properties 32 Items 34 Copy Task 36 Weil-Known Item Metadata 41 Custom Metadata 44 Item Transformations 47

Table of Contents 3 MSBuild Deep Dive, Part 2 53 Dynamic Properties and Items 53 Dynamic Properties and Items: MSBuild 3.5 53 Property and Item Evaluation 60 Importing Files 64 Extending the Build Process 69 Property Functions and Item Functions 77 Property Functions 77 String Property Functions 78 Static Property Functions 79 MSBuild Property Functions 80 Item Functions 82 Part ii Customizing MSBuild 4 Custom Tasks 87 Custom Task Requirements 87 Creating Your First Task 88 Task Input/Output 91 Supported Task Input and Output Types 95 Using Arrays with Task Inputs and Outputs 97 Inline Tasks 101 TaskFactory HI Extending ToolTask 116 ToolTask Methods 118 ToolTask Properties 119 Debugging Tasks 124 5 Custom Loggers 129 Overview 129 Console Logger 130 File Logger 132 ILogger Interface 134 Creating Custom Loggers 135 Extending the Logger Abstract Class 140 Extending Existing Loggers 146 FileLoggerBase and XmlLogger 151 Debugging Loggers 157

Part ill Advanced MSBuild Topics 6 Batching and Incremental Builds 163 Batching Overview 163 Task Batching 166 Target Batching 170 Combining Task and Target Batching 172 Multi-batching 175 Using Batching to Build Multiple Configurations 177 Batching Using Multiple Expressions 181 Batching Using Shared Metadata 183 Incremental Building 188 Partially Building Targets 190 7 External Tools 193 Exec Task 193 MSBuild Task 197 MSBuild and Visual Studio Known Error Message Formats 203 Creating Reusable Build Elements 204 NUnit 206 FxCop 215 Part iv MSBuild Cookbook 8 Practical Applications, Part 1 223 Setting the Assembly Version 223 Building Multiple Projects 225 Attaching Multiple File Loggers 231 Creating a Logger Macro 232 Custom Before/After Build Steps in the Build Lab 233 Handling Errors 235 Replacing Values in Config Files 237 Extending the Clean 239 9 Practical Applications, Part 2 245 Starting and Stopping Services 245 Web Deployment Project Overview 246 Zipping Output Files, Then Uploading to an FTP Site 252

Compressing JavaScript Files 254 Encrypting web.config 256 Building Dependent Projects 258 Deployment Using Web Deployment Projects 260 Partv MSBuild in Visual C++ 2010 10 MSBuild in Visual C++ 2010, Part 1 267 The New.vcxproj Project File 267 Anatomy of the Visual C++ Build Process 269 Diagnostic Output 271 Build Parallelism 272 Configuring Project- and File-Level Build Parallelism 273 File Tracker-Based Incremental Build 279 Incremental Build 279 File Tracker 279 Trust Visual C++ Incremental Build 281 Troubleshooting 281 Property Sheets 281 System Property Sheets and User Property Sheets 284 Visual C++ Directories 285 11 MSBuild in Visual C++ 2010, Part 2 289 Property Pages 289 Reading and Writing Property Values 289 Build Customizations 294 Platforms and Platform Toolsets 297 Native and Managed Multi-targeting 300 Native Multi-targeting 300 How Does Native Multi-targeting Work? 301 Managed Multi-targeting 301 Default Visual C++ Tasks and Targets 302 Default Visual C++ Tasks 303 Default Visual C++ Targets 303 ImportBefore, ImportAfter, ForcelmportBeforeCppTargets, and ForcelmportAfterCppTargets 306 Default Visual C++ Property Sheets 307

Migrating from Visual C++ 2008 and Earlier to Visual C++ 2010 311 IDE Conversion 311 Command-Line Conversion 314 Summary 315 12 Extending Visual C++ 2010 317 Build Events, Custom Build Steps, and the Custom Build Tool 317 Build Events 317 Custom Build Step 319 Custom Build Tool 322 Adding a Custom Target to the Build 324 Creating a New Property Page 326 Troubleshooting 331 Creating a Build Customization 332 Adding a New Platform and Platform Toolset 338 Deploying Your Extensions 342 Part vi Team Foundation Build 13 Team Build Quick Start 347 Introduction to Team Build 347 Team Build Features 347 High-Level Architecture 348 Preparing for Team Build 350 Team Build Deployment Topologies 350 What Makes a Good Build Machine? 351 Installing Team Build on the Team Foundation Server 352 Setting Up a Build Controller 352 Setting Up a Build Agent 355 Drop Folders 359 Creating a Build Definition 360 General 360 Trigger 361 Workspace 365 Build Defaults 367 Process 368 Retention Policy 369

Working with Build Queues and History 371 Visual Studio 372 Working with Builds from the Command Line 383 Team Build Security 388 Service Accounts 388 Permissions 391 Team Build Deep Dive 395 Process Templates 395 Default Template 396 Logging 396 Build Number 397 Agent Reservation 398 Clean 399 Sync 400 Label 400 Compile and Test 401 Source Indexing and Symbol Publishing 404 Associate Changesets and Work Items 407 Copy Files to the Drop Location 407 Revert Files and Check in Gated Changes 409 Create Work Items for Build Failure 409 Configuring the Team Build Service 409 Changing Communications Ports 409 Requiring SSL 410 Running Interactively 411 Running Multiple Build Agents 412 Build Controller Concurrency 413 Team Build API 414 Creating a Project 414 Connecting to Team Project Collection 415 Connecting to Team Build 416 Working with Build Service Hosts 416 Working with Build Definitions 417 Working with Builds 419 Workflow Foundation Quick Start 423 Introduction to Workflow Foundation 423 Types of Workflows 423

Building a Simple Workflow Application 424 Workflow Design 426 Built-in Activities 426 Working with Data 428 Exception Handling 430 Custom Activities 433 Workflow Extensions 437 Persistence 437 Tracking 437 Putting It All Together Workflow Foundation Image Resizer Sample Application 438 Overview 438 Building the Application 438 Running the Application 452 Debugging the Application 452 Summary 453 16 Process Template Customization 455 Getting Started 455 Creating a Process Template Library 455 Creating a Custom Activity Library 460 Process Parameters 461 Defining 451 Metadata 463 User Interface 466 Supported Reasons 468 Backward and Forward Compatibility 469 Team Build Activities 469 AgentScope 469 ChecklnGatedChanges 470 ConvertWorkspaceltem/ConvertWorkspaceltems 470 ExpandEnvironmentVariables 470 FindMatchingFiles 470 GetBuildAgent 471 GetBuildDetail 471 GetBuildDirectory 471 GetBuildEnvironment 471 GetTeamProjectCollection 471 InvokeForReason 471

Table of Contents InvokeProcess 471 MSBuild 472 SetBuildProperties 472 SharedResourceScope 473 UpdateBuildNumber 473 Custom Activities 473 BuildActivity Attribute 473 Extensions 474 Logging 475 Logging Verbosity 475 Logging Activities 476 Logging Programmatically 477 Adding Hyperlinks 478 Exceptions 482 Deploying 482 Process Templates 482 Custom Assemblies 483 Downloading and Loading Dependent Assemblies 485 Part vii Web Development Tool 17 Web Deployment Tool, Part 1 489 Web Deployment Tool Overview 490 Working with Web Packages 490 Package Creation 492 Installing Packages 494 msdeploy.exe Usage Options 498 MSDeploy Providers 500 MSDeploy Rules 504 MSDeploy Parameters 510 -declareparam 513 -setparam 515 MSDeploy Manifest Provider 517 18 Web Deployment Tool, Part 2 521 Web Publishing Pipeline Overview 521 XML Document Transformations 521

Web Publishing Pipeline Phases 530 Excluding Files 533 including Additional Files 536 Database 539 19 Web Deployment Tool Practical Applications 545 Publishing Using MSBuild 545 Parameterizing Packages 550 Using -setparamfile 554 Using the MSDeploy Temp Agent 556 Deploying Your Site from Team Build 557 Deploying to Multiple Destinations Using Team Build 560 Excluding ACLs from the Package 565 Synchronizing an Application to Another Server 566 Index 589 Appendix A New Features in MSBuild 4.0 (available online) 569 Appendix B Appendix C Building Large Source Trees (available online) 579 Upgrading from Team Foundation Build 2008 (available online) 585