winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Add DSC Resource identifier to WinGet manifests

Open denelon opened this issue 2 years ago • 3 comments

Description of the new feature / enhancement

When I'm trying to author a WinGet configuration file (*.dsc.yaml) it's not easy to discover the DSC resource with the ability to configure the package.

I'd like to have a field in the WinGet manifest with a pointer to a DSC Resource. This would allow WinGet to help configuration file authors locate resources. For example, if a user is adding Visual Studio to a configuration, the manifest for Visual Studio would be able to indicate the "Microsoft.VisualStudio.DSC" module can configure Visual Studio.

Proposed technical implementation details

No response

denelon avatar Aug 15 '23 15:08 denelon

I've been thinking about something like:

DesiredStateConfiguration:  # optional pointer to DSC resources
  PowerShellModule:         # optional PowerShell Module
  DscResources:             # optional DSC resources
    - DscResource:          # optional DSC resource
  PowerShellRepository:     # optional PowerShell repository

The WinGet community repository would have a policy to only allow the PowerShell Gallery "SourceLocation" for the "PowerShellRepository" key.

During manifest validation, existence checks would be the only initial automated capability until the PowerShell DSC v3 "export" capability is added.

denelon avatar Aug 30 '23 15:08 denelon

This might also be a fix the error message I'm seeing with The module for the configuration unit is available in multiple locations with the same version.. I don't see a way to specify the repository to pull DSC resources from.

cdhunt avatar Dec 28 '23 16:12 cdhunt

I'm starting to think that it might be better to leverage the existing DSC document schema to define the set of resources required to extract configuration.

JohnMcPMS avatar Feb 06 '24 20:02 JohnMcPMS