Closed Trenly closed 1 week ago
@denelon
Hey, would you be interested in building a WinGet Configuration for folks that would ensure VSCode and the extension is installed?
I'm going to update the guidance in the future, so for now I'd put one as "./configurations/configuration.dsc.yaml" And I'd put a copy of it under the new location in the future as well. I'm still talking with @crutkas and others about the new guidance.
We're going to suggest using the ".winget" extension for the configuration files in Git based projects. I think Clint was suggesting using the ".config" directory, but I didn't want to step on anything there by adding another "*.yaml" file. I've also seen a PR to add ".winget" as a YAML extension in VSCode.
Yep! I can do that
The ID is displayed in the output of the run which is nice as well:
It might be worth adding ids for the extensions.
It worked on my local x64 device (some of the components were already installed):
Next, I'll test in Windows Sandbox.
I could probably shorten some of the IDs too
It looks like it might not be installing the extensions.
Can you verify on your end if they are appearing? It might be how the Sandbox WDAGUtility account is administrator or something else might be broken on my end.
Will check
@denelon - It does not install the extensions for me. So, I switched over to using the Microsoft.VSCode.DSC
module in this repo. . . . and they still don't install. Doesn't matter if VSCode is open or closed.
PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method Get -Property @{Name='redhat.vscode-yaml'}
Name Version Exist Insiders
---- ------- ----- --------
redhat.vscode-yaml 1.15.0 True False
PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method Test -Property @{Name='redhat.vscode-yaml'}
InDesiredState
--------------
True
PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method Get -Property @{Name='EditorConfig.EditorConfig'}
Name Version Exist Insiders
---- ------- ----- --------
EditorConfig.EditorConfig False False
PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method test -Property @{Name='EditorConfig.EditorConfig'}
InDesiredState
--------------
False
PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method set -Property @{Name='EditorConfig.EditorConfig'}
RebootRequired
--------------
False
PS C:\Users\Trenly> Invoke-DscResource -Name VSCodeExtension -ModuleName Microsoft.VSCode.Dsc -Method test -Property @{Name='EditorConfig.EditorConfig'}
InDesiredState
--------------
False
OK, so it looks like we have a bug to go chase down.
Given that it isn't a bug with the configuration file, but a bug in the DSC Resource, should this wait to merge?
Do you want me to go ahead and merge it since we have a bug on the module already created? I'm fine with that since the blast radius is small right now.
I think that would be great @denelon
/azp run
The yaml looks good to me so lets go ahead and get this checked in. I'll look into fixing the bug for VSCode dsc.
Already raised a PR to fix it
Microsoft Reviewers: Open in CodeFlow