Automating Development Tools Installation with WinGet and DSC

Automating Development Tools Installation with WinGet and DSC Streamline the installation of essential development tools using winget (Windows Package Manager) and Desired State Configuration (DSC). With this approach, you can automate the setup of applications and tools, ensuring consistency across your environment. General Overview This configuration leverages winget to install applications and tools automatically. It adopts the version format configurationVersion: 0.2.0. Resources are defined using the Microsoft.WinGet.DSC schema for WinGetPackage, simplifying the setup process. Key Resources and Their Purpose 1. Git Installs Git for version control, supporting collaborative coding and repository management. Pre-release versions are enabled (allowPrerelease: true). Package ID: Git.Git. 2. GitHub CLI Facilitates command-line interaction with GitHub repositories, streamlining workflows. Pre-release versions are enabled. Package ID: GitHub.cli. 3. WinMerge Provides powerful tools for comparing and merging files, a must-have for developers. Pre-releases are supported. Package ID: WinMerge.WinMerge. 4. Microsoft .NET SDK 8.0 Installs the latest version of .NET SDK (8.0) for application development. Pre-releases are enabled for early access. Package ID: Microsoft.DotNet.SDK.8. 5. Visual Studio 2022 Community Edition Sets up Visual Studio 2022 Community Edition for comprehensive development. Includes support for pre-release features. Package ID: Microsoft.VisualStudio.2022.Community. 6. VS Components Installs additional Visual Studio workloads as specified in the .vsconfig file located in the ${WinGetConfigRoot} directory. Depends on the installation of Visual Studio. DependsOn: VisualStudio. 7. Visual Studio Code Deploys VS Code, a lightweight and versatile code editor. Supports pre-release versions for cutting-edge features. Package ID: Microsoft.VisualStudioCode. How It Works Directives: Specify metadata like descriptions and enable pre-release versions. Settings: Define the package ID and source (winget) for each tool. Dependencies: Manage installation order; e.g., VS Components require Visual Studio to be installed first. Configuration Example Here is an example configuration using the Microsoft.WinGet.DSC schema: ...

March 15, 2025 · 3 min · Taner