From e843bcc5816aea411a8c6a0329fea46ad29b7cfe Mon Sep 17 00:00:00 2001 From: David Bennett Date: Fri, 6 Jun 2025 14:45:16 -0700 Subject: [PATCH 1/4] Add VS Enterprise and Professional winget configurations --- .config/configuration_enterprise.winget | 34 +++++++++++++++++++++++ .config/configuration_professional.winget | 34 +++++++++++++++++++++++ doc/Developing.md | 4 ++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .config/configuration_enterprise.winget create mode 100644 .config/configuration_professional.winget diff --git a/.config/configuration_enterprise.winget b/.config/configuration_enterprise.winget new file mode 100644 index 0000000000..20943cca03 --- /dev/null +++ b/.config/configuration_enterprise.winget @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 +# Reference: https://github.com/microsoft/winget-cli#building-the-client +properties: + resources: + - resource: Microsoft.Windows.Settings/WindowsSettings + directives: + description: Enable Developer Mode + # Requires elevation for the set operation + securityContext: elevated + allowPrerelease: true + settings: + DeveloperMode: true + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: vsPackage + directives: + description: Install Visual Studio 2022 (any edition is OK) + # Requires elevation for the set operation + securityContext: elevated + settings: + id: Microsoft.VisualStudio.2022.Enterprise + source: winget + - resource: Microsoft.VisualStudio.DSC/VSComponents + dependsOn: + - vsPackage + directives: + description: Install required VS workloads from project .vsconfig file + # Requires elevation for the get and set operations + securityContext: elevated + allowPrerelease: true + settings: + productId: Microsoft.VisualStudio.Product.Enterprise + channelId: VisualStudio.17.Release + vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig' + configurationVersion: 0.2.0 diff --git a/.config/configuration_professional.winget b/.config/configuration_professional.winget new file mode 100644 index 0000000000..a7594dbfae --- /dev/null +++ b/.config/configuration_professional.winget @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 +# Reference: https://github.com/microsoft/winget-cli#building-the-client +properties: + resources: + - resource: Microsoft.Windows.Settings/WindowsSettings + directives: + description: Enable Developer Mode + # Requires elevation for the set operation + securityContext: elevated + allowPrerelease: true + settings: + DeveloperMode: true + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: vsPackage + directives: + description: Install Visual Studio 2022 (any edition is OK) + # Requires elevation for the set operation + securityContext: elevated + settings: + id: Microsoft.VisualStudio.2022.Professional + source: winget + - resource: Microsoft.VisualStudio.DSC/VSComponents + dependsOn: + - vsPackage + directives: + description: Install required VS workloads from project .vsconfig file + # Requires elevation for the get and set operations + securityContext: elevated + allowPrerelease: true + settings: + productId: Microsoft.VisualStudio.Product.Professional + channelId: VisualStudio.17.Release + vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig' + configurationVersion: 0.2.0 diff --git a/doc/Developing.md b/doc/Developing.md index fcf0da2617..0af7b695c0 100644 --- a/doc/Developing.md +++ b/doc/Developing.md @@ -24,7 +24,9 @@ ## Building the client 1. Clone the repository -2. Configure your system using the [configuration file](../.config/configuration.winget) in the repository. To run the configuration, use `winget configure .config/configuration.winget` from the project root so relative paths resolve correctly. +2. Configure your system using the [configuration file](../.config/configuration.winget) in the repository. To run the configuration with VS Community, use `winget configure .config/configuration.winget` from the project root so relative paths resolve correctly. + - For VS Professional: `winget configure .config/configuration_professional.winget` + - For VS Enterprise: `winget configure .config/configuration_enterprise.winget` 3. Run `vcpkg integrate install` from the Developer Command Prompt / Developer PowerShell for VS 2022. This is a one-time setup step until the configuration file in step 2 is updated to work with vcpkg setup. Open `winget-cli\src\AppInstallerCLI.sln` in Visual Studio and build. We currently only build using the solution; command-line methods of building a VS solution should work as well. From 6e52faf9dc270b7357d821f825c200676217caa6 Mon Sep 17 00:00:00 2001 From: David Bennett Date: Mon, 9 Jun 2025 13:00:06 -0700 Subject: [PATCH 2/4] Rename configuration files to be consistent with PowerToys naming --- ...on_enterprise.winget => configuration.vsEnterprise.winget} | 0 ...rofessional.winget => configuration.vsProfessional.winget} | 0 doc/Developing.md | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename .config/{configuration_enterprise.winget => configuration.vsEnterprise.winget} (100%) rename .config/{configuration_professional.winget => configuration.vsProfessional.winget} (100%) diff --git a/.config/configuration_enterprise.winget b/.config/configuration.vsEnterprise.winget similarity index 100% rename from .config/configuration_enterprise.winget rename to .config/configuration.vsEnterprise.winget diff --git a/.config/configuration_professional.winget b/.config/configuration.vsProfessional.winget similarity index 100% rename from .config/configuration_professional.winget rename to .config/configuration.vsProfessional.winget diff --git a/doc/Developing.md b/doc/Developing.md index 0af7b695c0..5c2be940b5 100644 --- a/doc/Developing.md +++ b/doc/Developing.md @@ -25,8 +25,8 @@ 1. Clone the repository 2. Configure your system using the [configuration file](../.config/configuration.winget) in the repository. To run the configuration with VS Community, use `winget configure .config/configuration.winget` from the project root so relative paths resolve correctly. - - For VS Professional: `winget configure .config/configuration_professional.winget` - - For VS Enterprise: `winget configure .config/configuration_enterprise.winget` + - For VS Professional: `winget configure .config/configuration.vsProfessional.winget` + - For VS Enterprise: `winget configure .config/configuration.vsEnterprise.winget` 3. Run `vcpkg integrate install` from the Developer Command Prompt / Developer PowerShell for VS 2022. This is a one-time setup step until the configuration file in step 2 is updated to work with vcpkg setup. Open `winget-cli\src\AppInstallerCLI.sln` in Visual Studio and build. We currently only build using the solution; command-line methods of building a VS solution should work as well. From 968b129d714708c4d82f400de119a9ca37dbd27e Mon Sep 17 00:00:00 2001 From: David Bennett Date: Mon, 9 Jun 2025 13:50:11 -0700 Subject: [PATCH 3/4] Update descriptions on the configuration files --- .config/configuration.vsEnterprise.winget | 2 +- .config/configuration.vsProfessional.winget | 2 +- .config/configuration.winget | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/configuration.vsEnterprise.winget b/.config/configuration.vsEnterprise.winget index 20943cca03..800729d111 100644 --- a/.config/configuration.vsEnterprise.winget +++ b/.config/configuration.vsEnterprise.winget @@ -13,7 +13,7 @@ properties: - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: - description: Install Visual Studio 2022 (any edition is OK) + description: Install Visual Studio 2022 Enterprise # Requires elevation for the set operation securityContext: elevated settings: diff --git a/.config/configuration.vsProfessional.winget b/.config/configuration.vsProfessional.winget index a7594dbfae..19475a618e 100644 --- a/.config/configuration.vsProfessional.winget +++ b/.config/configuration.vsProfessional.winget @@ -13,7 +13,7 @@ properties: - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: - description: Install Visual Studio 2022 (any edition is OK) + description: Install Visual Studio 2022 Professional # Requires elevation for the set operation securityContext: elevated settings: diff --git a/.config/configuration.winget b/.config/configuration.winget index 07195bd4da..01654421a7 100644 --- a/.config/configuration.winget +++ b/.config/configuration.winget @@ -13,7 +13,7 @@ properties: - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: - description: Install Visual Studio 2022 (any edition is OK) + description: Install Visual Studio 2022 Community # Requires elevation for the set operation securityContext: elevated settings: From 72b285cda45962c2c65cd3e146cef34a12c0065c Mon Sep 17 00:00:00 2001 From: David Bennett Date: Mon, 16 Jun 2025 10:44:42 -0700 Subject: [PATCH 4/4] Update dev doc configuration docs --- doc/Developing.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Developing.md b/doc/Developing.md index 5c2be940b5..25be453796 100644 --- a/doc/Developing.md +++ b/doc/Developing.md @@ -24,7 +24,8 @@ ## Building the client 1. Clone the repository -2. Configure your system using the [configuration file](../.config/configuration.winget) in the repository. To run the configuration with VS Community, use `winget configure .config/configuration.winget` from the project root so relative paths resolve correctly. +2. Configure your system using the [configuration file](../.config/configuration.winget) in the repository. Run one of the following configurations from the project root so relative paths resolve correctly: + - For VS Community: `winget configure .config/configuration.winget` - For VS Professional: `winget configure .config/configuration.vsProfessional.winget` - For VS Enterprise: `winget configure .config/configuration.vsEnterprise.winget` 3. Run `vcpkg integrate install` from the Developer Command Prompt / Developer PowerShell for VS 2022. This is a one-time setup step until the configuration file in step 2 is updated to work with vcpkg setup.