Skip to content

Commit 6ec90f2

Browse files
authored
Add securityContext to configuration file (#5309)
<!-- To check a checkbox place an "x" between the brackets. e.g: [x] --> - [x] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [ ] This pull request is related to an issue. Setting developer mode, installing Visual Studio 2022 & fetching and installing VS components all require elevation. Added `securityContext: elevated` for these resources. Removed `allowPrerelease: true` for `Microsoft.WinGet.DSC/WinGetPackage` as it's GA now. Also fixed a bad link in the docs ----- ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5309)
1 parent 86fda9f commit 6ec90f2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.config/configuration.winget

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ properties:
55
- resource: Microsoft.Windows.Developer/DeveloperMode
66
directives:
77
description: Enable Developer Mode
8+
# Requires elevation for the set operation
9+
securityContext: elevated
810
allowPrerelease: true
911
settings:
1012
Ensure: Present
1113
- resource: Microsoft.WinGet.DSC/WinGetPackage
1214
id: vsPackage
1315
directives:
1416
description: Install Visual Studio 2022 (any edition is OK)
15-
allowPrerelease: true
17+
# Requires elevation for the set operation
18+
securityContext: elevated
1619
settings:
1720
id: Microsoft.VisualStudio.2022.Community
1821
source: winget
@@ -21,6 +24,8 @@ properties:
2124
- vsPackage
2225
directives:
2326
description: Install required VS workloads from project .vsconfig file
27+
# Requires elevation for the get and set operations
28+
securityContext: elevated
2429
allowPrerelease: true
2530
settings:
2631
productId: Microsoft.VisualStudio.Product.Community

doc/Developing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* .NET Desktop Development
1111
* Desktop Development with C++
1212
* Universal Windows Platform Development
13-
* Check [.vsconfig file](.vsconfig) for full components list
13+
* Check [.vsconfig file](../.vsconfig) for full components list
1414

1515
* [Windows SDK for Windows 11 (10.0.22000.194)](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/)
1616

0 commit comments

Comments
 (0)