Top Banner
William Bartholomew Developer Productivity Specialist Technology One
26

Whats New in MSBuild 3.5 and Team Build 2008

Aug 21, 2015

Download

Business

wbarthol
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Whats New in MSBuild 3.5 and Team Build 2008

William BartholomewDeveloper Productivity SpecialistTechnology One

Page 2: Whats New in MSBuild 3.5 and Team Build 2008

Multi-TargetingMulti-ProcessorRegistry AccessNew Loggers

Page 3: Whats New in MSBuild 3.5 and Team Build 2008

Visual Studio version no longer “strongly bound” to the .NET Framework version.

Upgrading Visual Studio is now less risky. Allows selecting between:

.NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5 (“Orcas”)

Available from Visual Studio and MSBuild. Use new MSBuild features without

changing build outputs.

Page 4: Whats New in MSBuild 3.5 and Team Build 2008

Toolset Choose between 2.0 or 3.5 Set via the ToolsVersion attribute of the

Project element Overridable via the MSBuild command-line

Target Framework Choose between 2.0, 3.0, or 3.5 Set via the TargetFrameworkVersion

property Overridable via the MSBuild command-line

Page 5: Whats New in MSBuild 3.5 and Team Build 2008

http://blogs.msdn.com/msbuild/archive/2006/11/03/msbuild-orcas-and-multi-targeting.aspx

Page 6: Whats New in MSBuild 3.5 and Team Build 2008

Initially set from the New Project dialog. Limits the set of project types available.

Change from the Project Properties dialog. Limits items available from the Add->New

Item dialog. Limits available references. Changing could result in warnings or

errors.

DEMO

Page 7: Whats New in MSBuild 3.5 and Team Build 2008

By default MSBuild will use what is specified in the project file.

You can override the Toolset (2.0 or 3.5) with: /toolsversion:X.Y /tv:X.Y

You can override the Target Framework (2.0, 3.0 or 3.5) with: /p:TargetFrameworkVersion=X.Y

Page 8: Whats New in MSBuild 3.5 and Team Build 2008

Need I say more? MSBuild command-line:

Disabled by default. Enabled with the /maxcpucount:X

argument. Shortcut is /m:X.

Visual Studio: Enabled by default (2 processors). Configurable via Tools->Options->Projects

and Solutions->Build and Run.DEMO

Page 9: Whats New in MSBuild 3.5 and Team Build 2008

Won’t necessarily improve build performance: Test with it enabled and disabled. Experiment with different numbers of CPUs on

machines with > 2 CPUs. Optimised for performing multiple builds:

MSBuild processes are kept for 60 seconds to perform subsequent builds.

If only performing a single build disable with /nr:false.

MSBuild task builds sequentially by default. BuildInParallel attribute (Boolean) overrides this.

Page 10: Whats New in MSBuild 3.5 and Team Build 2008

Provides a way to retrieve the value of a registry key without calling a task: $(Registry:<key name>[@<value

name>]) $(Registry:HKEY_LOCAL_MACHINE\

SOFTWARE\Microsoft\.NETFramework@InstallRoot)

Page 11: Whats New in MSBuild 3.5 and Team Build 2008

Logs to “msbuild.log” in the current directory.

/fileLogger (or /fl) /fileLoggerParameters: (or /flp:)

LogFile=<Filename> Append Verbosity=<Verbosity> Encoding=<Encoding>

/fileLoggerParameters:LogFile=MyLog.txt;Append;Verbosity=diagnostic;Encoding=UTF-8

Page 12: Whats New in MSBuild 3.5 and Team Build 2008

Similar to File Logger but creates a log file per “node” (processor).

Uses /fileLoggerParameters to configure.

LogFile is used as a template to which the node id is appended.

Page 13: Whats New in MSBuild 3.5 and Team Build 2008

Creating a New Build Definition Workspace Mapping User Definable Location Retention Policies Editing Experience

Executing Builds Queuing Scheduling Continuous Integration

Command-Line Notification

Page 14: Whats New in MSBuild 3.5 and Team Build 2008

No longer requires WorkspaceMapping.xml file.

Can be specified using GUI.Can copy an existing workspace.Probably one of the most important

settings to configure for a “large” repository.

Page 15: Whats New in MSBuild 3.5 and Team Build 2008

Build definitions can now be stored anywhere in source control instead of under $/TeamBuildTypes/<BuildTypeName>.

Why do this? Store build types directly along the

projects they build. Improve build reproducibility. Simplify branching.

Page 16: Whats New in MSBuild 3.5 and Team Build 2008

Specify how many builds should be kept by status: Succeeded Partially Succeeded Failed Stopped

Individual builds can be retained indefinitely.

Can only specify number of builds, not days. Can’t be based on build quality.

Page 17: Whats New in MSBuild 3.5 and Team Build 2008

Build definitions can be edited via GUI rather than via TFSBuild.proj.

Most settings now stored in database and placeholders put in TFSBuild.proj for backwards compatibility.

Can be disabled.

Page 18: Whats New in MSBuild 3.5 and Team Build 2008

DEMO

Page 19: Whats New in MSBuild 3.5 and Team Build 2008

Builds submitted to a busy build agent are now queued rather than failing.

List of build agents are defined so machine names don’t need to be entered.

Build agents can be disabled. Can override drop folder when queuing a

build. Can specify priority. MSBuild properties can be passed

through.

Page 20: Whats New in MSBuild 3.5 and Team Build 2008

DEMO

Page 21: Whats New in MSBuild 3.5 and Team Build 2008

Build definitions can be scheduled to execute at a specific time on selected days.

Build will only execute if there are changes in the workspace. In Beta 2 you can force it to always build

even if there are no changes.

Page 22: Whats New in MSBuild 3.5 and Team Build 2008

Automatically execute a build definition whenever a check-in occurs within its workspace. Each check-in queues a new build.

Or, accumulate check-ins. Check-ins are accumulated to reduce the

number of builds. User specifiable time threshold.

Page 23: Whats New in MSBuild 3.5 and Team Build 2008

DEMO

Page 24: Whats New in MSBuild 3.5 and Team Build 2008

Supports bulk deletion of builds. Choose between starting or queuing a

build (synchronous vs asynchronous). Supports building specific versions of

source-code rather than only the latest. Can override drop location, user the build

is requested by, and MSBuild properties. Builds can now be stopped from within

Visual Studio.

Page 25: Whats New in MSBuild 3.5 and Team Build 2008

Notification tray icon to queue, monitor, and manage builds.

Similar to CCTray but much more powerful.

Will be released post-Orcas.Specification available at

http://www.slideshare.net/jimlamb/build-notification-applet.

Page 26: Whats New in MSBuild 3.5 and Team Build 2008

“DEMO”build-notification-applet-24800.pdf