MSBuild 1‑Week Learning Plan
|
|
Microsoft Build 1‑Week Learning Plan
Goal: Master MSBuild fundamentals and practical customization in 7 days. Designed for modern SDK‑style projects (.NET 6/7/8+), Visual Studio, and MAUI.
Overview
-
Day 1 — Introduction to MSBuild
What MSBuild is, project structure, Properties, Items, Targets, Tasks, evaluation order.
-
Day 2 — Properties & Items Deep Dive
Property evaluation rules, item transforms (@(Item->'...')), batching, metadata, built‑in properties/items.
-
Day 3 — Targets & Tasks
Target dependencies (DependsOnTargets), BeforeTargets/AfterTargets, common tasks, writing a simple custom task in C#.
-
Day 4 — Build Process for .NET / MAUI
SDK‑style conventions, implicit imports, Directory.Build.props/Directory.Build.targets, multi‑targeting.
-
Day 5 — Advanced MSBuild
Property functions, conditions, incremental builds (inputs/outputs), graph builds, diagnostic logging.
-
Day 6 — Customization & Extensibility
Creating reusable .props/.targets, overriding imports safely, solution‑wide customization.
-
Day 7 — Real‑World Scenarios & Labs
Versioning, environment configs, CI/CD tuning, packaging/publish profiles, MAUI specifics.
Daily Outcomes
- Day 1: Read and write basic MSBuild; run a custom target.
- Day 2: Confident with properties, items, transforms, metadata, batching.
- Day 3: Model target dependencies; hook into existing targets.
- Day 4: Understand SDK imports and MAUI build pipeline.
- Day 5: Diagnose builds, speed them up, apply conditions and property functions.
- Day 6: Share and reuse build logic across solutions.
- Day 7: Automate real‑world scenarios end‑to‑end.
Prerequisites
- .NET SDK installed (6.0 or later)
- Visual Studio or VS Code
- Command line access (
dotnet)
- Any sample .NET project to experiment
How to Use This Plan
- Spend ~45–60 minutes each day.
- Do the hands‑on exercises immediately after reading.
- Keep a scratch
.targets file to collect your reusable snippets.