Skip to content

Microsoft.DSC/Group unusable via winget configure #6460

Description

@mikepasco

Relevant area(s)

WinGet CLI, DSC Resource

Relevant command(s)

winget configure

Brief description of your issue

Microsoft.DSC/Group fails when run via winget configure, even though the identical document works correctly when run directly against dsc.exe

Root cause (from source): in src/Microsoft.Management.Configuration.Processor/DSCv3/Schema_2024_04/Outputs/, GetSimpleItem.cs / TestSimpleItem.cs type ActualState as JsonObject?, which fails to deserialize when the actual payload is a JsonArray — which is exactly what Microsoft.DSC/Group returns (one array entry per nested resource, per docs/concepts/resources/kinds.md in PowerShell/DSC). Separately, FullItemBase.ProcessResult() does detect the array case for the outer Result and populates FullResults instead of SimpleResult, but GetFullItem.Settings explicitly throws NotImplementedException("Requires constructing the entire group as the settings.") in that path.

Suggested fix: implement GetFullItem.Settings to construct a settings representation from FullResults for group-kind resources, and/or handle Microsoft.DSC/Group (and other group-kind resources) as a distinct code path rather than assuming a single-object actualState shape.

Steps to reproduce

  1. Save as repro.winget:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
metadata:
  winget:
    processor:
      identifier: dscv3
resources:
  - name: RegistryTweaks
    type: Microsoft.DSC/Group
    properties:
      $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
      resources:
        - type: Microsoft.Windows/Registry
          name: AppTheme
          properties:
            keyPath: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize
            valueName: AppsUseLightTheme
            valueData:
              DWord: 0
        - type: Microsoft.Windows/Registry
          name: SystemTheme
          properties:
            keyPath: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize
            valueName: SystemUsesLightTheme
            valueData:
              DWord: 0
  1. Run: winget configure -f repro.winget --accept-configuration-agreements

Expected behavior

Both nested Microsoft.Windows/Registry resources are applied. Running the same document directly via dsc config set -f repro.winget (bypassing winget) works correctly and confirms this — dsc.exe returns actualState as a JSON array there (one entry per nested resource), which is the documented/correct shape for a group-kind resource.

Actual behavior

Microsoft.DSC/Group [RegistryTweaks]
The configuration unit failed due to an internal error: -2146233079
The JSON value could not be converted to System.Text.Json.Nodes.JsonObject.
Path: $.actualState | LineNumber: 0 | BytePositionInLine: .

Environment

winget --info

Windows Package Manager v1.29.280
© 2026 Microsoft. All rights reserved.

Windows: Windows.Desktop v10.0.26200.8973
System Architecture: Arm64
Package: Microsoft.DesktopAppInstaller v1.29.280.0

WinGet Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads
Configuration Modules              %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
ConfigurationProcessorPath                Disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-ConfigureIssue related to WinGet ConfigurationDSC-ResourceIssue related to DSC ResourcesIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIssue needs to be triaged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions