microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.75k stars 1.41k forks source link

Add DSC Resource identifier to WinGet manifests #3523

Open denelon opened 11 months ago

denelon commented 11 months ago

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 commented 11 months ago

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.

cdhunt commented 7 months ago

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.

JohnMcPMS commented 6 months ago

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.