MSBuild Unveiled Peter Schneider MVP Visual Developer – Visual C# MCT, MCSD.NET, MCAD.NET, MCDBA

Slides:



Advertisements
Similar presentations
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
Advertisements

Tutorial 12: Enhancing Excel with Visual Basic for Applications
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
Web Deployment Projects Targeting your Development, Staging and Production Environments. Eli Robillard, Knowledge Systems Practice Lead.
OCLC Online Computer Library Center CONTENTdm Developers Meeting ALA Midwinter Meeting Seattle, WA January 19 th, 2007 Claire Cocco, Product Manager Joe.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
CSC 395 – Software Engineering Lecture 24: Apache Ant –or– Programming the results of programming Based upon a talk by Anthony Wat.
Ingest and Loading DigiTool Version 3.0. Ingest and Loading 2 Ingest Agenda Ingest Overview and Introduction Ingest activity steps Transformers Task Chains.
Homework 2 In the docs folder of your Berkeley DB, have a careful look at documentation on how to configure BDB in main memory. In the docs folder of your.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
CS 1400 Using Microsoft Visual Studio 2005 if you don’t have the appropriate appendix.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
Hadoop: The Definitive Guide Chap. 8 MapReduce Features
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Module 1: Introduction to C# Module 2: Variables and Data Types
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Using Visual Studio 2013 An Integrated Development Environment (IDE)
Automating the Build Process using Ant SE-2030 Dr. Rob Hasker 1 Based on material by Dr. Mark L. Hornick.
Internationalization and the Java Stack Matt Wheeler.
1- Date TimePicker 2- Month Calendar 3- User Defined Controls.
ITCS 6010 SALT. Speech Application Language Tags (SALT) Speech interface markup language Extension of HTML and other markup languages Adds speech and.
Developing Reporting Solutions with SQL Server
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Tips & Tricks: Extending MSBuild with Tasks, Loggers, and Targets Faisal Mohamood TLNL01 Program Manager - MSBuild Microsoft Corporation.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
MSBuild: Architecting a Customized Build System Rajeev Goel, TLN402 Software Development Engineer MSBuild Microsoft Corporation.
Systems Analysis and Design in a Changing World, 3rd Edition
DEV337 Modeling Distributed Enterprise Applications Using UML in Visual Studio.NET David Keogh Program Manager Visual Studio Enterprise Tools.
© 2006 by «Author»; made available under the EPL v1.0 | Date | Other Information, if necessary Jason Weathersby BIRT Evangelist, Actuate Corp. Leveraging.
Advanced Reporting Concepts Philip Yuen Program Manager Microsoft Office Project.
1 Introducing MSBuild: Build Engine for "Whidbey" and "Longhorn" Alex Kipman Program Manager Alex Kipman
Workflow Tips & Tricks Ulrich Mende Mende EDV Beratung Session Code: 3206.
Programming with Visual Studio 2005.NET A short review of the process.
Programming with Visual Studio.NET A short review of the process.
DEV330 Visual Studio.NET IDE Tips and Tricks Billy Hollis Author / consultant.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved More about.
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
Web Services Error Handling and Debugging. Agenda Simple SOAP faults Advanced SOAP faults SOAP headers and faults Error handling From a Service Perspective.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Developing SQL Server 2000 Reporting Services Applications Brian Welcker Group Program Manager SQL Server Reporting Services Microsoft Corporation.
Chapter 16 UML Class Diagrams.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
CoRD Meeting 12 March 2003 STIPES (Lot 4) STIPES = Statistical Inquiries from Popular European Software.
Copyright © 2007, Oracle. All rights reserved. Using Document Management and Collaboration Appendix B.
The Akoma Ntoso Naming Convention Fabio Vitali University of Bologna.
Session 02 Module 3: Statements and Operators Module 4: Programming constructs Module 5: Arrays.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
DAT 354: Building SQL Server Reporting Services Applications Brian Welcker Group Program Manager SQL Server Reporting Services Microsoft Corporation.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
1 Example Uses of Java Reflection Explained Simply.
Using Ant in Eclipse Dwight Deugo Nesa Matic
Pulling Data into the Model. Agenda Overview BI Development Studio Integration Services Solutions Integration Services Packages DTS to SSIS.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Part VI: Mapping URLs.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
Building Enterprise Applications Using Visual Studio®
Tech·Ed North America /7/2018 2:58 PM
Searching Business Data with MOSS 2007 Enterprise Search
Quick Start Guide for Visual Studio 2010
Searching Business Data with MOSS 2007 Enterprise Search
11/21/2018 4:27 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Using Visual Studio and VS Code for Embedded C/C++ Development
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
Microsoft Dynamics.
Martin MSBuild Martin
Just Enough SSIS Scripting to be Dangerous.
Presentation transcript:

MSBuild Unveiled Peter Schneider MVP Visual Developer – Visual C# MCT, MCSD.NET, MCAD.NET, MCDBA

In This Session… MSBuild Architecture MSBuild Architecture MSBuild – File Format MSBuild – File Format MSBuild – Tips & Tricks MSBuild – Tips & Tricks

Authors PROJECT FILE - $%#^$&% Abracadabra Feeds Visual Studio.NET 2002/2003 VS Build System Produces Final Product Pre build step Post build step

Final Product Produces Feeds Authors DEVELOPER Authors MSBuild Design Goals MSBuild MSBuild PROJECT FILE

MSBuild in 5 minutes The underlying build engine in Visual Studio 2005 The underlying build engine in Visual Studio 2005 Fully open and published XML file format for describing build Fully open and published XML file format for describing build Visual Studio 2005 build is fully customizable Visual Studio 2005 build is fully customizable You extend the build by writing managed code (tasks and loggers) You extend the build by writing managed code (tasks and loggers) You don’t need the IDE to build Visual Studio projects You don’t need the IDE to build Visual Studio projects

MSBuild File Format MyCoolApp true $(AppName).exe <Csc EmitDebugInformation=“$(DebugSymbols)” OutputAssembly=“$(OutputAssembly)”/>

MSBuild Key Components Items Items Properties Properties Targets Targets Tasks Tasks

Build Items Represent Input to the build system Represent Input to the build system Grouped into Item Collections Grouped into Item Collections  Use userdefined CollectionNames Are used as Parameters for Tasks Are used as Parameters for Tasks Use Include and Exclude Attributes, Wildcards (**,*,?) Use Include and Exclude Attributes, Wildcards (**,*,?)

Build Items Reference ItemGroups Example: Reference ItemGroups Example:

Build Item Metadata Items may contain MetaData Items may contain MetaData 1 2 Used for batching Used for batching

Well Known Item Meta Data %(FullPath)%(RootDir)%(Filename)%(Extension)%(RelativeDir)%(Directory) %(RecursiveDir) %(Identity) %(ModifiedTime) %(CreationTime) %(AccessedTime) <Copy DestinationFiles=“%(Compile.Filename).bak” />

Build Properties Properties are key/value pairs used to configure builds Properties are key/value pairs used to configure builds Defined in PropertyGroups Defined in PropertyGroups Debug Reference Properties with $(Propertyname) e.g. $(Configuration) Reference Properties with $(Propertyname) e.g. $(Configuration)

Reserved Properties  MSBuildProjectDirectory  MSBuildProjectFile  MSBuildProjectExtension  MSBuildProjectFullPath  MSBuildProjectName  MSBuildBinPath  MSBuildProjectDefaultTargets  MSBuildExtensionsPath Some PropertyNames are reserved: Some PropertyNames are reserved: Environment Variables are accessible as Properties Environment Variables are accessible as Properties

Setting Properties You can set Properties from the commandline You can set Properties from the commandline MSBuild.exe MyProject.proj /p:Configuration=Debug MSBuild.exe MyProject.proj /p:Configuration=Debug;Another=Test You can set Properties depending on other properties You can set Properties depending on other properties full

Build Targets Targets group tasks together in a particular order Targets group tasks together in a particular order Allows sections of the build process to be called individually (Commandline, CallTarget Task) Allows sections of the build process to be called individually (Commandline, CallTarget Task) MSBuild.exe MyProject.proj /t:Compile MSBuild.exe MyProject.proj /t:Clean;Compile

Default Targets Use DefaultTargets Attribute Use DefaultTargets Attribute... InitialTargets are executed first InitialTargets are executed first...

Incremental Builds Reduce build time Reduce build time Only builds targets which are out-of- date or not yet built Only builds targets which are out-of- date or not yet built Specify Inputs and Outputs of the target Specify Inputs and Outputs of the target <Target Name=“Compile” Inputs = Outputs = “HelloWorld.exe” >

Build Tasks A Task is a unit of executable code which performs atomic build operations A Task is a unit of executable code which performs atomic build operations

Build Task Outputs Task can return Output mapped to Items or Properties Task can return Output mapped to Items or Properties

Build Task ContinueOnError Specify the ContinueOnError Attribute to succeed target for non-critical tasks Specify the ContinueOnError Attribute to succeed target for non-critical tasks Other possibilities: Other possibilities:

Project Elements Use Choose, When, Otherwise Elements Use Choose, When, Otherwise Elements Test

Summary Properties Properties Items Items Targets Targets Tasks Tasks Projects Projects