Gone Mobile

102: You should learn some MSBuild

April 12th, 2024

The conversation covers various topics related to MSBuild and project files. It starts with an introduction and a discussion about the weather. The hosts then delve into the history and evolution of MSBuild, including the transition to SDK style projects. They explain the structure of new project files and highlight the benefits of using CS Proj for managing NuGet packages and CI. The conversation also covers customizing project files for platform-specific assets and the use of conditions in project files. The hosts discuss the importance of workloads and the rationale behind different SDKs. They also touch on the future of workloads and the challenges associated with them. This conversation explores various aspects of MSBuild, including workloads, importing MSBuild from NuGet packages, building custom entitlements, adding items to build from NuGet packages, customizing build props and targets, writing custom MSBuild tasks, using custom tasks and source generators, incremental source generation, and Michaela's MSBuild Editor Extension. The hosts emphasize the importance of understanding MSBuild and encourage listeners to explore and experiment with CSProj files to optimize their build processes.


  • MSBuild is a powerful tool for managing project files and building applications.
  • SDK style projects provide a more streamlined and approachable format for project files.
  • CS Proj files can be customized to include platform-specific assets and configurations.
  • Using CS Proj for managing NuGet packages and CI can simplify the development process.
  • Workloads in MSBuild provide a way to manage and organize project dependencies and configurations. MSBuild is a powerful build system that allows for customization and automation of the build process.
  • Importing MSBuild from NuGet packages provides an easier way to test nightly builds and service releases.
  • Customizing build props and targets allows for fine-grained control over the build process and the inclusion of specific assets.
  • Writing custom MSBuild tasks in C# can be a powerful way to extend the build system and perform complex build operations.
  • Using custom tasks and source generators can enhance the build process and improve performance.
  • Mikayla's MSBuild Editor Extension provides helpful features like IntelliSense and package version management for CSProj files.


  • Hosts: Jon Dick, Allan Ritchie
  • Audio Engineer: Jim Heath


  • 00:00 Introduction and Weather
  • 00:20 Introduction to MSBuild
  • 01:12 Acquiring Taste for MSBuild
  • 03:17 Slim CS Proj
  • 04:03 Structure of New Project Files
  • 05:12 Default Maui Project Template
  • 06:36 Using CS Proj for NuGet Packages
  • 07:56 Benefits of Using CS Proj for CI
  • 08:26 Customizing Project Files for Platform-Specific Assets
  • 09:53 Leveraging MSBuild for Customization
  • 10:57 Command Line vs. CS Proj
  • 11:33 Importing Files and Directory Build Props
  • 12:37 Multiple SDK Imports
  • 13:15 Properties and Item Groups in Project Files
  • 14:05 Conditions in Project Files
  • 19:48 Rationale for Different SDKs
  • 22:19 Directory Build Props for Performance
  • 24:07 Workloads and SDK Imports
  • 26:17 Future of Workloads
  • 29:08 Challenges with Workloads
  • 31:09 MSBuild and Workloads
  • 32:03 Importing MSBuild from NuGet Packages
  • 33:12 Custom Entitlements and Build Props
  • 34:09 Building Custom Entitlements
  • 36:29 Adding Items to Build from NuGet Packages
  • 37:38 Automatically Making Apps Work with Libraries
  • 38:36 Customizing Build Props and Targets
  • 39:40 Doing Build-Related Tasks in MSBuild
  • 42:10 Writing Custom MSBuild Tasks
  • 44:23 Using Custom Tasks and Source Generators
  • 46:19 Incremental Source Generation
  • 49:46 Michaela's MSBuild Editor Extension
  • 56:19 Getting Started with MSBuild

Episode Comments