microsoft / microsoft/VisualStudioDSC

Conversion from JSON failed

Open
#34 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
16
Forks
6
PR merge metrics
No merged PRs in 30d

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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.

Assessment

Tech stack
powershell
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.