-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet dsc resource only works on second run #83
Comments
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: install-dotnet9-SDK
directives:
description: Install .NET 9 SDK
securityContext: elevated
settings:
id: Microsoft.DotNet.SDK.9
source: winget
- resource: Microsoft.DotNet.DSC/DotNetToolPackage
dependsOn:
- install-dotnet9-SDK
directives:
description: Install Microsoft.dotnet-scaffold
allowPrerelease: true
settings:
PackageId: microsoft.dotnet-scaffold
Version: 9.0.1
Prerelease: true
Exist: true
- resource: Microsoft.DotNet.DSC/DotNetToolPackage
dependsOn:
- install-dotnet9-SDK
directives:
description: Install Microsoft.dotnet-scaffold-aspire
allowPrerelease: true
settings:
PackageId: microsoft.dotnet-scaffold-aspire
Version: 9.0.1
Prerelease: true
Exist: true
- resource: Microsoft.DotNet.DSC/DotNetToolPackage
dependsOn:
- install-dotnet9-SDK
directives:
description: Install Microsoft.dotnet-scaffold-aspnet
allowPrerelease: true
settings:
PackageId: microsoft.dotnet-scaffold-aspnet
Version: 9.0.1
Prerelease: true
Exist: true
configurationVersion: 0.2.0 |
@Gijsreyn any clue on this one? I was suspecting it might not be on the path, but that doesn't explain why the second and third instances succeed. |
Hi @denelon, yes and I've scratched my head a couple of times until I finally found it. I think this picture says a thousand words: So basically, when the class was trying to get instantiated, the output from the list operation couldn't be properly handled. To be more specific, the This function didn't take into account the first run experience. I've hit up #154 to set the environment variable. Thinking about it also, now that .NET SDK is GA, we can also switch to the You mind informing one of your favorite engineers to approve the PR? It's a tiny one. Cheers! :) |
Thanks so much @Gijsreyn !!! @AmelBawa-msft approved and merged. Next is the publish phase. |
claudiaregio
commented
Feb 7, 2025
via email
•
edited by microsoft-github-policy-service
bot
Loading
edited by microsoft-github-policy-service
bot
[heart] Claudia Regio reacted to your message:
…________________________________
|
Brief description of your issue
I have to run the configuration file twice for it to work, always fails on first run
Using Microsoft.DotNet.DSC/DotNetToolPackage
Steps to reproduce
Expected behavior
For it to work on first run
Actual behavior
Only works on second try
Environment
Windows: Windows.Desktop v10.0.26100.2033
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0
Winget Directories
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
The text was updated successfully, but these errors were encountered: