Skip to content

Commit 5691433

Browse files
authored
Add VS Professional and VS Enterprise configurations (#5515)
Closes #5514 The configuration files are identical to the original save for the VS edition. * Adds two new winget configuration files which work with VS Professional and VS Enterprise. * Updates documentation to include VS Enterprise and VS Professional instructions. Tested using VS Enterprise on two machines. - [x] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [x] This pull request is related to an issue. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5515)
1 parent ae7b476 commit 5691433

File tree

4 files changed

+73
-2
lines changed

4 files changed

+73
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
2+
# Reference: https://github.com/microsoft/winget-cli#building-the-client
3+
properties:
4+
resources:
5+
- resource: Microsoft.Windows.Settings/WindowsSettings
6+
directives:
7+
description: Enable Developer Mode
8+
# Requires elevation for the set operation
9+
securityContext: elevated
10+
allowPrerelease: true
11+
settings:
12+
DeveloperMode: true
13+
- resource: Microsoft.WinGet.DSC/WinGetPackage
14+
id: vsPackage
15+
directives:
16+
description: Install Visual Studio 2022 Enterprise
17+
# Requires elevation for the set operation
18+
securityContext: elevated
19+
settings:
20+
id: Microsoft.VisualStudio.2022.Enterprise
21+
source: winget
22+
- resource: Microsoft.VisualStudio.DSC/VSComponents
23+
dependsOn:
24+
- vsPackage
25+
directives:
26+
description: Install required VS workloads from project .vsconfig file
27+
# Requires elevation for the get and set operations
28+
securityContext: elevated
29+
allowPrerelease: true
30+
settings:
31+
productId: Microsoft.VisualStudio.Product.Enterprise
32+
channelId: VisualStudio.17.Release
33+
vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
34+
configurationVersion: 0.2.0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
2+
# Reference: https://github.com/microsoft/winget-cli#building-the-client
3+
properties:
4+
resources:
5+
- resource: Microsoft.Windows.Settings/WindowsSettings
6+
directives:
7+
description: Enable Developer Mode
8+
# Requires elevation for the set operation
9+
securityContext: elevated
10+
allowPrerelease: true
11+
settings:
12+
DeveloperMode: true
13+
- resource: Microsoft.WinGet.DSC/WinGetPackage
14+
id: vsPackage
15+
directives:
16+
description: Install Visual Studio 2022 Professional
17+
# Requires elevation for the set operation
18+
securityContext: elevated
19+
settings:
20+
id: Microsoft.VisualStudio.2022.Professional
21+
source: winget
22+
- resource: Microsoft.VisualStudio.DSC/VSComponents
23+
dependsOn:
24+
- vsPackage
25+
directives:
26+
description: Install required VS workloads from project .vsconfig file
27+
# Requires elevation for the get and set operations
28+
securityContext: elevated
29+
allowPrerelease: true
30+
settings:
31+
productId: Microsoft.VisualStudio.Product.Professional
32+
channelId: VisualStudio.17.Release
33+
vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
34+
configurationVersion: 0.2.0

.config/configuration.winget

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ properties:
1313
- resource: Microsoft.WinGet.DSC/WinGetPackage
1414
id: vsPackage
1515
directives:
16-
description: Install Visual Studio 2022 (any edition is OK)
16+
description: Install Visual Studio 2022 Community
1717
# Requires elevation for the set operation
1818
securityContext: elevated
1919
settings:

doc/Developing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
## Building the client
2525

2626
1. Clone the repository
27-
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.
27+
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:
28+
- For VS Community: `winget configure .config/configuration.winget`
29+
- For VS Professional: `winget configure .config/configuration.vsProfessional.winget`
30+
- For VS Enterprise: `winget configure .config/configuration.vsEnterprise.winget`
2831
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.
2932

3033
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.

0 commit comments

Comments
 (0)