Conversion from JSON failed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- devops
Research direction
Start by reproducing the issue with winget configure and the supplied YAML, then inspect the VSComponents resource's Test invocation and the conversion error in the log. Done means identifying why the VSComponents configuration returns a non-JSON value and confirming that the supplied configuration can be tested without the conversion failure.
Written by the indexing model from the issue text.
Description
Trying to install components via winget configure, I get the error:
Apply :: VSComponents
The configuration unit failed while attempting to test the current system state.
Conversion from JSON failed with error: Unexpected character encountered while parsing value: V. Path '', line 0, position 0.
The log file has:
2025-05-14 16:54:22.303 [CONF] Configuration unit VSComponents[] failed with code 0x8a15c105 and error message:
Conversion from JSON failed with error: Unexpected character encountered while parsing value: V. Path '', line 0, position 0.
Microsoft.Management.Configuration.Processor.Exceptions.InvokeDscResourceException: Failed when calling `Test` for resource: VSComponents [Microsoft.VisualStudio.DSC] Message: 'Conversion from JSON failed with error: Unexpected character encountered while parsing value: V. Path '', line 0, position 0.
'
at Microsoft.Management.Configuration.Processor.DscModule.DscModuleV2.InvokeTestResource(PowerShell pwsh, ValueSet settings, String name, ModuleSpecification moduleSpecification)
at Microsoft.Management.Configuration.Processor.Runspaces.HostedEnvironment.InvokeTestResource(ValueSet settings, String name, ModuleSpecification moduleSpecification)
at Microsoft.Management.Configuration.Processor.Unit.ConfigurationUnitProcessor.TestSettings()
Configuration snippet:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2019 Professional
settings:
id: Microsoft.VisualStudio.2019.Professional
source: winget
version: 16.11.9
- resource: Microsoft.VisualStudio.DSC/VSComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads from vsconfig file
securityContext: elevated
allowPrerelease: true
settings:
productId: Microsoft.VisualStudio.Product.Professional
channelId: VisualStudio.16.Release
includeRecommended: true
components:
- Microsoft.VisualStudio.Workload.ManagedDesktop
- Microsoft.VisualStudio.Workload.VCTools
- Microsoft.VisualStudio.Component.VC.ATL
- Microsoft.VisualStudio.Component.VC.ATLMFC
- Microsoft.VisualStudio.Component.VC.CLI.Support
- Microsoft.VisualStudio.Component.WinXP
- Microsoft.VisualStudio.Component.VC.v141.ATL
- Microsoft.VisualStudio.Component.VC.v141.MFC
- Dominant language
- PowerShell
- Stars
- 16
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/VisualStudioDSC
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/VisualStudioDSC#37 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
microsoft/VisualStudioDSC#33 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/VisualStudioDSC#24 · 1 comment ·
All issues in microsoft/VisualStudioDSC
Similar issues
-
core dependencies
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
module: core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bigbluebutton/bigbluebutton#25849 ·
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rocky-data/rocky#2181 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100