2using System.Collections.Generic;
4using System.Threading.Tasks;
7using Nuke.Common.Tooling;
8using Nuke.Common.Tools.PowerShell;
18 internal static void Setup()
20 if (EnvironmentInfo.Platform == PlatformFamily.Windows)
25 $progressPreference = 'silentlyContinue';
26 Write-Information "Downloading WinGet and its dependencies...
";
27 Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle;
28 Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx;
29 Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx;
30 Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx;
31 Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx;
32 Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle;
36 PowerShellTasks.PowerShell(
38 workingDirectory: EnvironmentInfo.SpecialFolder(SpecialFolders.UserProfile)
41 var settingsFile = EnvironmentInfo.SpecialFolder(SpecialFolders.LocalApplicationData)
42 /
"Packages"/
"Microsoft.DesktopAppInstaller_8wekyb3d8bbwe"/
"LocalState"/
"settings.json";
44 settingsFile.WriteAllText(