Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .config/configuration.vsEnterprise.winget
Original file line number Diff line number Diff line change
@@ -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 Enterprise
# 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
34 changes: 34 additions & 0 deletions .config/configuration.vsProfessional.winget
Original file line number Diff line number Diff line change
@@ -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 Professional
# 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
2 changes: 1 addition & 1 deletion .config/configuration.winget
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion doc/Developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
## 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. 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.

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.
Expand Down