Relevant area(s)
WinGet CLI, DSC Resource
Relevant command(s)
winget configure
Brief description of your issue
Microsoft.DSC/Include appears to fail under winget configure in two separate ways:
-
Relative include paths resolve incorrectly
configurationFile: ./sdk/node.winget is resolved relative to the installed DSC package directory, not the parent configuration file.
-
Valid included configs fail during test
- If I use a path that does resolve to the child config,
winget configure fails while testing Microsoft.DSC/Include with:
The requested operation requires an element of type 'Object', but the target element has type 'Array'.
The included file succeeds when run directly with winget configure, so the child config itself appears valid.
Steps to reproduce
Repro files
Parent config: configuration.sdk.winget
# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json
# The new Microsoft DSC schema is not aligned (yet) with WinGet Studio
# See https://github.com/microsoft/winget-studio/issues/193
# yaml-language-server-disable https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
metadata:
winget:
processor:
identifier: dscv3
resources:
- type: Microsoft.DSC/Include
name: NodeJS
metadata:
description: Install Node.js LTS
properties:
configurationFile: "${WinGetConfigRoot}/sdk/node.winget"
Child config: sdk/node.winget
# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json
# The new Microsoft DSC schema is not aligned (yet) with WinGet Studio
# See https://github.com/microsoft/winget-studio/issues/193
# yaml-language-server-disable https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
metadata:
winget:
processor:
identifier: dscv3
resources:
- type: Microsoft.WinGet/Package
name: NodeJS
metadata:
description: Installing Node.js LTS
properties:
id: OpenJS.NodeJS.LTS
source: winget
useLatest: true
Repro steps
Case 1: child config directly
Run the child config directly:
winget configure --accept-configuration-agreements -f .\sdk\node.winget
Case 2: parent config using Include
Run the parent config:
winget configure --accept-configuration-agreements -f .\configuration.sdk.winget
Expected behavior
Both commands should succeed.
In particular:
Microsoft.DSC/Include should resolve relative configurationFile paths from the parent config file location.
- A child config that succeeds directly should also succeed when included.
Actual behavior
Relative path case
If I change the parent to use a relative path:
configurationFile: ./sdk/node.winget
the include fails because the path is resolved against the installed DSC package directory:
The configuration unit failed while attempting to test the current system state.
2026-06-06T03:29:25.156426Z ERROR trace_message="PID 27884: Failed to open included file 'C:\\Program Files\\WindowsApps\\Microsoft.DesiredStateConfiguration_3.2.1.0_x64__8wekyb3d8bbwe\\./sdk/node.winget': The system cannot find the path specified. (os error 3)"
2026-06-06T03:29:25.158673Z ERROR Failed to run process 'dsc': Command: Resource 'dsc' [exit code 2] manifest description: Resource error…
<See the log file for additional details>
Some of the configuration was not applied successfully.
Expanded/absolute path case
If I use a path that does resolve to the child config, the include still fails during test:
2026-06-06 13:17:20.360 [CONF] Configuration unit Microsoft.DSC/Include[NodeJS] failed with code 0x80131509 and error message:
The requested operation requires an element of type 'Object', but the target element has type 'Array'.
System.InvalidOperationException: The requested operation requires an element of type 'Object', but the target element has type 'Array'.
at System.Text.Json.ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType expectedType, JsonTokenType actualType)
at System.Text.Json.JsonDocument.TryGetNamedPropertyValue(Int32 index, ReadOnlySpan`1 propertyName, JsonElement& value)
at System.Text.Json.JsonElement.TryGetProperty(ReadOnlySpan`1 propertyName, JsonElement& value)
at System.Text.Json.JsonElement.TryGetProperty(String propertyName, JsonElement& value)
at Microsoft.Management.Configuration.Processor.DSCv3.Schema_2024_04.Outputs.FullItemBase`2.CreateFrom(JsonDocument document, JsonSerializerOptions options)
at Microsoft.Management.Configuration.Processor.DSCv3.Schema_2024_04.DSCv3.TestResource(ConfigurationUnitInternal unitInternal, ProcessorRunSettings runSettings)
at Microsoft.Management.Configuration.Processor.DSCv3.Unit.DSCv3ConfigurationUnitProcessor.TestSettingsInternal()
at Microsoft.Management.Configuration.Processor.Unit.ConfigurationUnitProcessorBase.TestSettings()
Notes
- The child file works when run directly, so this seems specific to the
Microsoft.DSC/Include path.
- This may be either:
- a
winget configure integration issue,
- a DSC v3 importer/result-shape issue,
- or a version/schema mismatch in how include/test results are handled.
- If switching to relative path, and using
dsc config set --file .\configuration.sdk.winget, it works perfectly fine
Environment
- WinGet: `1.29.140-preview`
- Package: `Microsoft.DesktopAppInstaller v1.29.140.0`
- OS: `Windows.Desktop v10.0.26220.8544`
- System Architecture: x64
Relevant area(s)
WinGet CLI, DSC Resource
Relevant command(s)
winget configure
Brief description of your issue
Microsoft.DSC/Includeappears to fail underwinget configurein two separate ways:Relative include paths resolve incorrectly
configurationFile: ./sdk/node.wingetis resolved relative to the installed DSC package directory, not the parent configuration file.Valid included configs fail during test
winget configurefails while testingMicrosoft.DSC/Includewith:The requested operation requires an element of type 'Object', but the target element has type 'Array'.The included file succeeds when run directly with
winget configure, so the child config itself appears valid.Steps to reproduce
Repro files
Parent config:
configuration.sdk.wingetChild config:
sdk/node.wingetRepro steps
Case 1: child config directly
Run the child config directly:
Case 2: parent config using Include
Run the parent config:
Expected behavior
Both commands should succeed.
In particular:
Microsoft.DSC/Includeshould resolve relativeconfigurationFilepaths from the parent config file location.Actual behavior
Relative path case
If I change the parent to use a relative path:
the include fails because the path is resolved against the installed DSC package directory:
Expanded/absolute path case
If I use a path that does resolve to the child config, the include still fails during test:
Notes
Microsoft.DSC/Includepath.winget configureintegration issue,dsc config set --file .\configuration.sdk.winget, it works perfectly fineEnvironment