diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4df4c6ac..f4fdf703 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: - manifest: 'manifests\uno.ui-preview.manifest.json' manifest_name: Preview - manifest: 'manifests\uno.ui-preview-major.manifest.json' - manifest_name: Preview net8 + manifest_name: Preview net9 - manifest: 'manifests\uno.ui.manifest.json' manifest_name: Stable Upgrade previous_tool_version: 1.4.2 @@ -151,7 +151,7 @@ jobs: dotnet_version: 8.0.200 # - manifest: 'manifests/uno.ui-preview-major.manifest.json' - # manifest_name: Preview net8 + # manifest_name: Preview net9 # previous_tool_version: '' # previous_tool_params: '' # os: macos-11 @@ -191,7 +191,7 @@ jobs: dotnet_version: 8.0.200 # - manifest: 'manifests/uno.ui-preview-major.manifest.json' - # manifest_name: Preview net8 + # manifest_name: Preview net9 # previous_tool_version: '' # previous_tool_params: '' # os: macos-12 @@ -303,7 +303,7 @@ jobs: - manifest: 'manifests/uno.ui-preview.manifest.json' manifest_name: Preview - manifest: 'manifests/uno.ui-preview-major.manifest.json' - manifest_name: Preview net8 + manifest_name: Preview net9 - manifest: 'manifests/uno.ui.manifest.json' manifest_name: Stable Upgrade diff --git a/UnoCheck/DotNet/DotNetWorkloadManager.cs b/UnoCheck/DotNet/DotNetWorkloadManager.cs index fdf3fe66..e28229de 100644 --- a/UnoCheck/DotNet/DotNetWorkloadManager.cs +++ b/UnoCheck/DotNet/DotNetWorkloadManager.cs @@ -84,49 +84,48 @@ string WriteRollbackFile(Manifest.DotNetWorkload[] workloads) const string RollbackOutputBeginMarker = "==workloadRollbackDefinitionJsonOutputStart=="; const string RollbackOutputEndMarker = "==workloadRollbackDefinitionJsonOutputEnd=="; - public async Task<(string id, string version, string sdkVersion)[]> GetInstalledWorkloads() - { - var dotnetExe = Path.Combine(SdkRoot, DotNetSdk.DotNetExeName); + public async Task<(string id, string version, string sdkVersion)[]> GetInstalledWorkloads() + { + var dotnetExe = Path.Combine(SdkRoot, DotNetSdk.DotNetExeName); - var args = new List - { - "workload", - "update", - "--print-rollback" - }; + var args = new List + { + "workload", + "update", + "--print-rollback" + }; - var r = await Util.WrapShellCommandWithSudo(dotnetExe, DotNetCliWorkingDir, true, args.ToArray()); + var r = await Util.WrapShellCommandWithSudo(dotnetExe, DotNetCliWorkingDir, true, args.ToArray()); - // Throw if this failed with a bad exit code - if (r.ExitCode != 0) - throw new Exception("Workload command failed: `dotnet " + string.Join(' ', args) + "`"); + // Throw if this failed with a bad exit code + if (r.ExitCode != 0) + throw new Exception("Workload command failed: `dotnet " + string.Join(' ', args) + "`"); var output = string.Join(" ", r.StandardOutput); + var startIndex = output.IndexOf(RollbackOutputBeginMarker); var endIndex = output.IndexOf(RollbackOutputEndMarker); - if(startIndex >= 0 && endIndex >= 0) + if (startIndex >= 0 && endIndex >= 0) { + // net8 and earlier use markers var start = startIndex + RollbackOutputBeginMarker.Length; - var json = output.Substring(start, endIndex - start); + output = output.Substring(start, endIndex - start); + } - var workloads = JsonSerializer.Deserialize>(json); + var workloads = JsonSerializer.Deserialize>(output); - return workloads - .Select(p => { - var versionParts = p.Value.Split("/", StringSplitOptions.None); - var workloadVersion = versionParts.First(); - var workloadSdkVersion = versionParts.ElementAtOrDefault(1) is { Length: > 0 } v ? v : ""; + return workloads + .Select(p => + { + var versionParts = p.Value.Split("/", StringSplitOptions.None); + var workloadVersion = versionParts.First(); + var workloadSdkVersion = versionParts.ElementAtOrDefault(1) is { Length: > 0 } v ? v : ""; - return (p.Key, workloadVersion, workloadSdkVersion); - }) - .ToArray(); - } - else - { - throw new Exception("Workload command output cannot be parsed: `dotnet " + string.Join(' ', args) + "`"); - } - } + return (p.Key, workloadVersion, workloadSdkVersion); + }) + .ToArray(); + } async Task CliInstallWithRollback(string rollbackFile, IEnumerable workloadIds) { diff --git a/manifests/uno.ui-preview-major.manifest.json b/manifests/uno.ui-preview-major.manifest.json index 796c5356..5ddfc212 100644 --- a/manifests/uno.ui-preview-major.manifest.json +++ b/manifests/uno.ui-preview-major.manifest.json @@ -3,12 +3,12 @@ "toolVersion": "1.14.0", "variables": { "OPENJDK_VERSION": "11.0.20.1", - "DOTNET_SDK_VERSION": "8.0.200", - "MACCATALYST_SDK_VERSION": "17.2.8022/8.0.100", - "IOS_SDK_VERSION": "17.2.8022/8.0.100", - "MACOS_SDK_VERSION": "14.2.8022/8.0.100", - "ANDROID_SDK_VERSION": "34.0.79/8.0.100", - "MAUI_VERSION": "8.0.6/8.0.100" + "DOTNET_SDK_VERSION": "9.0.100-preview.1.24101.2", + "MACCATALYST_SDK_VERSION": "17.2.9088-net9-p1/9.0.100-preview.1", + "IOS_SDK_VERSION": "17.2.9088-net9-p1/9.0.100-preview.1", + "MACOS_SDK_VERSION": "14.2.9088-net9-p1/9.0.100-preview.1", + "ANDROID_SDK_VERSION": "34.99.0-preview.1.151/9.0.100-preview.1", + "MAUI_VERSION": "9.0.0-preview.1.9973/9.0.100-preview.1" }, "variableMappers": [ ], @@ -100,35 +100,35 @@ { "workloadId": "android", "workloadManifestId": "microsoft.net.sdk.android", - "packageId": "Microsoft.NET.Sdk.Android.Manifest-8.0.100", + "packageId": "Microsoft.NET.Sdk.Android.Manifest-9.0.100-preview.1", "version": "$(ANDROID_SDK_VERSION)", "supportedPlatforms": [ "Windows", "OSX" ] }, { "workloadId": "ios", "workloadManifestId": "microsoft.net.sdk.ios", - "packageId": "Microsoft.NET.Sdk.iOS.Manifest-8.0.100", + "packageId": "Microsoft.NET.Sdk.iOS.Manifest-9.0.100-preview.1", "version": "$(IOS_SDK_VERSION)", "supportedPlatforms": [ "Windows", "OSX" ] }, { "workloadId": "maccatalyst", "workloadManifestId": "microsoft.net.sdk.maccatalyst", - "packageId": "Microsoft.NET.Sdk.MacCatalyst.Manifest-8.0.100", + "packageId": "Microsoft.NET.Sdk.MacCatalyst.Manifest-9.0.100-preview.1", "version": "$(MACCATALYST_SDK_VERSION)", "supportedPlatforms": [ "Windows", "OSX" ] }, { "workloadId": "macos", "workloadManifestId": "microsoft.net.sdk.macos", - "packageId": "Microsoft.NET.Sdk.macOS.Manifest-8.0.100", + "packageId": "Microsoft.NET.Sdk.macOS.Manifest-9.0.100-preview.1", "version": "$(MACOS_SDK_VERSION)", "supportedPlatforms": [ "Windows", "OSX" ] }, { "workloadId": "maui", "workloadManifestId": "microsoft.net.sdk.maui", - "packageId": "Microsoft.NET.Sdk.Maui.Manifest-8.0.100", + "packageId": "Microsoft.NET.Sdk.Maui.Manifest-9.0.100-preview.1", "version": "$(MAUI_VERSION)", "supportedPlatforms": [ "Windows", "OSX" ] }