From 594ffaed2a8194b32d7b1b660e613c9bd05d2b81 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sat, 8 Jun 2024 17:39:44 +0300 Subject: [PATCH 01/19] ci: Always use .NET 9 SDK --- .github/workflows/uwp-autoconvert.yml | 4 +-- build/ci/.azure-devops-android-tests.yml | 5 ++++ build/ci/.azure-devops-docs.yml | 5 ++++ build/ci/.azure-devops-ios-tests.yml | 10 ++++++++ build/ci/.azure-devops-macos.yml | 5 ++++ .../.azure-devops-package-netcoremobile.yml | 9 ++++--- .../.azure-devops-project-template-tests.yml | 8 ------ build/ci/.azure-devops-skia-tests.yml | 7 ++++++ build/ci/.azure-devops-uwp-convert.yml | 5 ++++ build/ci/net7/global.json | 14 ----------- build/ci/net8/global.json | 14 ----------- build/ci/templates/dotnet-install.yml | 7 ------ .../templates/dotnet-mobile-install-linux.yml | 7 ++---- .../templates/dotnet-mobile-install-mac.yml | 20 +++------------ .../dotnet-mobile-install-windows.yml | 17 ++++--------- .../dotnet9-mobile-install-windows.yml | 25 ------------------- .../SamplesApp.UITests.csproj | 2 +- 17 files changed, 56 insertions(+), 108 deletions(-) delete mode 100644 build/ci/net7/global.json delete mode 100644 build/ci/net8/global.json delete mode 100644 build/ci/templates/dotnet9-mobile-install-windows.yml diff --git a/.github/workflows/uwp-autoconvert.yml b/.github/workflows/uwp-autoconvert.yml index 6acdd78e5c83..7fd8060bd3cc 100644 --- a/.github/workflows/uwp-autoconvert.yml +++ b/.github/workflows/uwp-autoconvert.yml @@ -13,7 +13,7 @@ concurrency: cancel-in-progress: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UnoCheck_Version: '1.20.2' + UnoCheck_Version: '1.24.0-dev.12' # Only convert using NetPrevious UnoDisableNetCurrentMobile: true @@ -31,7 +31,7 @@ jobs: - name: Pin .NET Version run: | - cp build/ci/net8/global.json global.json + cp build/ci/net9/global.json global.json - name: Setup .NET SDK uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3 diff --git a/build/ci/.azure-devops-android-tests.yml b/build/ci/.azure-devops-android-tests.yml index af0e7ead6c59..ed8964e2ec59 100644 --- a/build/ci/.azure-devops-android-tests.yml +++ b/build/ci/.azure-devops-android-tests.yml @@ -48,6 +48,11 @@ jobs: - template: templates/gitversion.yml + - script: | + cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.netcoremobile + dotnet workload restore + displayName: Workload restore + - bash: | cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.netcoremobile dotnet publish -f net8.0-android -c Release -p:UnoTargetFrameworkOverride=net8.0-android /bl:$(build.artifactstagingdirectory)/android-netcoremobile-sampleapp.binlog diff --git a/build/ci/.azure-devops-docs.yml b/build/ci/.azure-devops-docs.yml index 27f2e86defde..56b44b1e7425 100644 --- a/build/ci/.azure-devops-docs.yml +++ b/build/ci/.azure-devops-docs.yml @@ -27,6 +27,11 @@ jobs: - template: templates/dotnet-mobile-install-windows.yml + - script: | + cd src/Uno.UI + dotnet workload restore Uno.UI.netcoremobile.csproj + displayName: Workload restore + - template: templates/gitversion.yml - template: templates/jdk-setup.yml diff --git a/build/ci/.azure-devops-ios-tests.yml b/build/ci/.azure-devops-ios-tests.yml index c2bd576cdf89..2d28b1e0d3ff 100644 --- a/build/ci/.azure-devops-ios-tests.yml +++ b/build/ci/.azure-devops-ios-tests.yml @@ -73,6 +73,11 @@ jobs: - template: templates/dotnet-mobile-install-mac.yml + - script: | + cd $(BUILD.SOURCESDIRECTORY)/src/SamplesApp/SamplesApp.netcoremobile + dotnet workload restore + displayName: Workload restore + - template: templates/ios-build-select-version.yml parameters: xCodeRoot: ${{ parameters.xCodeRootBuild }} @@ -150,6 +155,11 @@ jobs: - template: templates/dotnet-mobile-install-mac.yml + - script: | + cd $(BUILD.SOURCESDIRECTORY)/src/SamplesApp/SamplesApp.netcoremobile + dotnet workload restore + displayName: Workload restore + - template: templates/ios-build-select-version.yml parameters: xCodeRoot: ${{ parameters.xCodeRootBuild }} diff --git a/build/ci/.azure-devops-macos.yml b/build/ci/.azure-devops-macos.yml index c326680c7175..5509426194a3 100644 --- a/build/ci/.azure-devops-macos.yml +++ b/build/ci/.azure-devops-macos.yml @@ -25,6 +25,11 @@ jobs: - template: templates/dotnet-mobile-install-mac.yml + - script: | + cd src/SamplesApp/SamplesApp.netcoremobile + dotnet workload restore + displayName: Workload restore + - template: templates/nuget-cache.yml parameters: nugetPackages: $(NUGET_PACKAGES) diff --git a/build/ci/.azure-devops-package-netcoremobile.yml b/build/ci/.azure-devops-package-netcoremobile.yml index 8b605be8bb14..4a7893519236 100644 --- a/build/ci/.azure-devops-package-netcoremobile.yml +++ b/build/ci/.azure-devops-package-netcoremobile.yml @@ -49,9 +49,12 @@ jobs: - template: templates/gitversion.yml - # Building with .NET 9 SDK for net8.0-ios17.0 to work. - # It looks like building net8.0-ios17.0 with .NET 8 SDK will end up using Microsoft.iOS 17.2 assembly. - - template: templates/dotnet9-mobile-install-windows.yml + - template: templates/dotnet-mobile-install-windows.yml + + - script: | + cd src/Uno.UI + dotnet workload restore Uno.UI.netcoremobile.csproj + displayName: Workload restore # This task is required to run in separately to avoid hitting targets file # caching issues with msbuild 17.3 or later diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index efb05bc92cf2..e65b778b19d6 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -70,10 +70,6 @@ jobs: - template: templates/gitversion.yml - - bash: | - sed -i.bu 's/8.0.100/8.0.200/' build/ci/net8/global.json - displayName: Replace global.json with .NET 8.0.200 - - template: templates/ios-build-select-version.yml parameters: xCodeRoot: ${{ parameters.xCodeRoot }} @@ -116,10 +112,6 @@ jobs: inputs: artifactName: NugetPackages - - script: | - sed -i 's/8.0.100/8.0.200/g' build/ci/net8/global.json - displayName: Replace global.json with .NET 8.0.200 - - template: templates/dotnet-mobile-install-linux.yml - template: templates/gitversion.yml diff --git a/build/ci/.azure-devops-skia-tests.yml b/build/ci/.azure-devops-skia-tests.yml index 29e992f1a4a8..5b38a2ebc0e6 100644 --- a/build/ci/.azure-devops-skia-tests.yml +++ b/build/ci/.azure-devops-skia-tests.yml @@ -214,6 +214,13 @@ jobs: dotnet build -c Debug -p:UnoDisableNetCurrent=true displayName: Build HR dependencies + # We need just the .NET 8 runtime (not the SDK). + # Building with .NET 9 SDK is fine, but running the app when the TFM is net8.0 requires the .NET 8 runtime + - task: UseDotNet@2 + inputs: + packageType: 'runtime' + version: '8.x' + - script: | cd $(SamplesAppArtifactPath) dotnet SamplesApp.Skia.Gtk.dll --runtime-tests=$(build.sourcesdirectory)/build/skia-gtk-runtime-tests-results.xml diff --git a/build/ci/.azure-devops-uwp-convert.yml b/build/ci/.azure-devops-uwp-convert.yml index 6eea254a1a00..4af9eacc4c7c 100644 --- a/build/ci/.azure-devops-uwp-convert.yml +++ b/build/ci/.azure-devops-uwp-convert.yml @@ -33,6 +33,11 @@ jobs: - template: templates/dotnet-mobile-install-windows.yml + - script: | + cd src/Uno.UI + dotnet workload restore Uno.UI.netcoremobile.csproj + displayName: Workload restore + - powershell: | cd $(build.sourcesdirectory)\src\Uno.WinUIRevert dotnet run "$(build.sourcesdirectory)" diff --git a/build/ci/net7/global.json b/build/ci/net7/global.json deleted file mode 100644 index 885bb343d9c9..000000000000 --- a/build/ci/net7/global.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "sdk": { - "version": "7.0.406", - "allowPrerelease": false, - "rollForward": "disable" - }, - "tools": { - "dotnet": "7.0.406" - }, - "msbuild-sdks": { - "MSBuild.Sdk.Extras": "3.0.44", - "Microsoft.Build.NoTargets": "3.7.56" - } -} diff --git a/build/ci/net8/global.json b/build/ci/net8/global.json deleted file mode 100644 index 02794de096c4..000000000000 --- a/build/ci/net8/global.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "sdk": { - "version": "8.0.201", - "allowPrerelease": false, - "rollForward": "disable" - }, - "tools": { - "dotnet": "8.0.201" - }, - "msbuild-sdks": { - "MSBuild.Sdk.Extras": "3.0.44", - "Microsoft.Build.NoTargets": "3.7.56" - } -} diff --git a/build/ci/templates/dotnet-install.yml b/build/ci/templates/dotnet-install.yml index 97f469510300..cbc913fe7c63 100644 --- a/build/ci/templates/dotnet-install.yml +++ b/build/ci/templates/dotnet-install.yml @@ -1,16 +1,9 @@ steps: - - bash: | - rm global.json - cp build/ci/net8/global.json global.json - displayName: "Using .NET 8 global.json" - condition: and(succeeded(), eq(variables.UnoDisableNetCurrent, 'true')) - - bash: | rm global.json cp build/ci/net9/global.json global.json displayName: "Using .NET 9 global.json" - condition: and(succeeded(), ne(variables.UnoDisableNetCurrent, 'true')) - task: UseDotNet@2 displayName: 'Use .NET SDK' diff --git a/build/ci/templates/dotnet-mobile-install-linux.yml b/build/ci/templates/dotnet-mobile-install-linux.yml index 64897c26605d..e5ac51078ba8 100644 --- a/build/ci/templates/dotnet-mobile-install-linux.yml +++ b/build/ci/templates/dotnet-mobile-install-linux.yml @@ -1,6 +1,5 @@ parameters: - UnoCheck_Version: '1.20.2' - UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/bd121b30a0044fd80df18618dd7915fe8ccf4503/manifests/uno.ui.manifest.json' + UnoCheck_Version: '1.23' steps: @@ -14,13 +13,11 @@ steps: sudo apt-get update sudo apt-get install -y msopenjdk-11 displayName: Install OpenJDK 11 - condition: and(succeeded(), ne(variables.UnoDisableNet7Mobile, 'true')) retryCountOnTaskFailure: 3 - bash: | dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json # androidsdk disabled for https://github.com/unoplatform/uno.check/issues/241 - uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --manifest ${{ parameters.UnoCheck_Manifest }} + uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 displayName: Install .NET Workloads - condition: and(succeeded(), ne(variables.UnoDisableNet7Mobile, 'true')) retryCountOnTaskFailure: 3 diff --git a/build/ci/templates/dotnet-mobile-install-mac.yml b/build/ci/templates/dotnet-mobile-install-mac.yml index 4f9519f7806c..c0b6c015e774 100644 --- a/build/ci/templates/dotnet-mobile-install-mac.yml +++ b/build/ci/templates/dotnet-mobile-install-mac.yml @@ -1,8 +1,5 @@ parameters: - UnoCheck_Version_Previous: '1.20.2' - UnoCheck_Manifest_Previous: 'https://raw.githubusercontent.com/unoplatform/uno.check/bd121b30a0044fd80df18618dd7915fe8ccf4503/manifests/uno.ui.manifest.json' - UnoCheck_Version_Current: '1.22.0' - UnoCheck_Manifest_Current: 'https://raw.githubusercontent.com/unoplatform/uno.check/f2ba48c5cb67d59d8025ca96e436e1a9f6f3012c/manifests/uno.ui-preview-major.manifest.json' + UnoCheck_Version: '1.23.0' steps: @@ -11,20 +8,9 @@ steps: - template: jdk-setup.yml - powershell: | - & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version_Previous }} --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest ${{ parameters.UnoCheck_Manifest_Previous }} + & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json + & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac displayName: Install .NET Workloads errorActionPreference: continue ignoreLASTEXITCODE: true retryCountOnTaskFailure: 3 - condition: and(succeeded(), eq(variables.UnoDisableNetCurrentMobile, 'true')) - - - powershell: | - & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version_Current }} --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest ${{ parameters.UnoCheck_Manifest_Current }} - displayName: Install .NET Workloads - errorActionPreference: continue - ignoreLASTEXITCODE: true - retryCountOnTaskFailure: 3 - condition: and(succeeded(), ne(variables.UnoDisableNetCurrentMobile, 'true')) - diff --git a/build/ci/templates/dotnet-mobile-install-windows.yml b/build/ci/templates/dotnet-mobile-install-windows.yml index 709c8581c375..c0b6c015e774 100644 --- a/build/ci/templates/dotnet-mobile-install-windows.yml +++ b/build/ci/templates/dotnet-mobile-install-windows.yml @@ -1,3 +1,6 @@ +parameters: + UnoCheck_Version: '1.23.0' + steps: - template: dotnet-install.yml @@ -5,19 +8,9 @@ steps: - template: jdk-setup.yml - powershell: | - & dotnet tool update --global uno.check --version 1.22.0 --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/f2ba48c5cb67d59d8025ca96e436e1a9f6f3012c/manifests/uno.ui-preview-major.manifest.json - displayName: Install .NET Workloads - errorActionPreference: continue - ignoreLASTEXITCODE: true - retryCountOnTaskFailure: 3 - condition: and(succeeded(), eq(variables.UnoDisableNetPreviousMobile, 'true')) - - - powershell: | - & dotnet tool update --global uno.check --version 1.20.2 --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/bd121b30a0044fd80df18618dd7915fe8ccf4503/manifests/uno.ui.manifest.json + & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json + & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac displayName: Install .NET Workloads errorActionPreference: continue ignoreLASTEXITCODE: true retryCountOnTaskFailure: 3 - condition: and(succeeded(), ne(variables.UnoDisableNetPreviousMobile, 'true')) diff --git a/build/ci/templates/dotnet9-mobile-install-windows.yml b/build/ci/templates/dotnet9-mobile-install-windows.yml deleted file mode 100644 index e02659777927..000000000000 --- a/build/ci/templates/dotnet9-mobile-install-windows.yml +++ /dev/null @@ -1,25 +0,0 @@ -steps: - - - bash: | - rm global.json - cp build/ci/net9/global.json global.json - displayName: "Using .NET 9 global.json" - - - task: UseDotNet@2 - displayName: 'Use .NET SDK' - retryCountOnTaskFailure: 3 - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - - - - template: jdk-setup.yml - - - powershell: | - & dotnet tool update --global uno.check --version 1.22.0 --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/f2ba48c5cb67d59d8025ca96e436e1a9f6f3012c/manifests/uno.ui-preview-major.manifest.json - displayName: Install .NET Workloads - errorActionPreference: continue - ignoreLASTEXITCODE: true - retryCountOnTaskFailure: 3 diff --git a/src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj b/src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj index 99baaed5ca99..eca6c39017ad 100644 --- a/src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj +++ b/src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj @@ -1,7 +1,7 @@ - $(NetPrevious) + $(NetCurrent) $(DefineConstants);TARGET_FRAMEWORK_OVERRIDE_ANDROID From e18105dbfc0f6e2e7b7ffb07e503e1632747a81b Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sat, 8 Jun 2024 22:42:06 +0300 Subject: [PATCH 02/19] chore: Adjust for preview SDK --- .../Builder/WpfHostBuilder.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/Uno.UI.Runtime.Skia.Wpf/Builder/WpfHostBuilder.cs b/src/Uno.UI.Runtime.Skia.Wpf/Builder/WpfHostBuilder.cs index 92d82b07e434..71740ba026b1 100644 --- a/src/Uno.UI.Runtime.Skia.Wpf/Builder/WpfHostBuilder.cs +++ b/src/Uno.UI.Runtime.Skia.Wpf/Builder/WpfHostBuilder.cs @@ -26,6 +26,36 @@ public WpfHostBuilder() } } + private static void AdjustPath(string dotnetSharedDirectory, string runtimeVersion, ref string windowsDesktopFrameworkPath) + { + // In at least preview SDKs, the .NET runtime version is different from the .NET Desktop runtime version for the same .NET SDK. + // For example, .NET SDK 9.0.100-preview.4 has these runtimes: + // .NET Runtime 9.0.0-preview.4.24266.19 + // ASP.NET Core Runtime 9.0.0-preview.4.24267.6 + //.NET Desktop Runtime 9.0.0-preview.4.24267.11 + // This is a quite hacky to get to the right path where we don't exactly know the version beforehand. + var indexOfPreview = runtimeVersion.IndexOf("-preview", StringComparison.Ordinal); + if (indexOfPreview > -1) + { + var mainVersion = runtimeVersion.Substring(0, indexOfPreview); + var directories = Directory.GetDirectories(Path.GetFullPath(Path.Combine(dotnetSharedDirectory, "Microsoft.WindowsDesktop.App"))); + foreach (var directory in directories) + { + var possibleVersion = Path.GetFileName(directory); + var possibleIndexOfPreview = possibleVersion?.IndexOf("-preview", StringComparison.Ordinal) ?? -1; + if (possibleIndexOfPreview > -1) + { + var desktopRuntimeVersion = possibleVersion!.Substring(0, possibleIndexOfPreview); + windowsDesktopFrameworkPath = Path.GetFullPath(Path.Combine( + dotnetSharedDirectory, + "Microsoft.WindowsDesktop.App", + possibleVersion)); + break; + } + } + } + } + private void RegisterAssemblyResolver() { AssemblyLoadContext.Default.Resolving += OnAssemblyResolving; @@ -46,6 +76,11 @@ private void RegisterAssemblyResolver() "Microsoft.WindowsDesktop.App", version)); + if (!Directory.Exists(_windowsDesktopFrameworkPath)) + { + AdjustPath(dotnetShared, version, ref _windowsDesktopFrameworkPath); + } + if (!Directory.Exists(_windowsDesktopFrameworkPath)) { throw new InvalidOperationException($"Unable to find the Microsoft.WindowsDesktop.App framework. An Uno Platform update may be required (Expected path {_windowsDesktopFrameworkPath})"); From 5c49a5a81452ba4ed515c542d535df4554f6e789 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sun, 9 Jun 2024 08:18:27 +0300 Subject: [PATCH 03/19] chore: Adjust --- .../Tests/HotReload/Given_HotReloadWorkspace.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/HotReload/Given_HotReloadWorkspace.cs b/src/Uno.UI.RuntimeTests/Tests/HotReload/Given_HotReloadWorkspace.cs index 21b83ba1ee20..643326f4a18b 100644 --- a/src/Uno.UI.RuntimeTests/Tests/HotReload/Given_HotReloadWorkspace.cs +++ b/src/Uno.UI.RuntimeTests/Tests/HotReload/Given_HotReloadWorkspace.cs @@ -234,13 +234,22 @@ private static void StartServer(int port) if (_process is null or { HasExited: true }) { var version = GetDotnetMajorVersion(); - var runtimeVersionPath = version <= 5 ? "netcoreapp3.1" : $"net{version}.0"; + var runtimeVersionPath = $"net{version}.0"; // Use the debug configuration so that remote control // gets properly enabled. var toolsPath = Path.Combine(GetRCHostAppPath(), "Debug"); var hostBinPath = Path.Combine(toolsPath, runtimeVersionPath, "Uno.UI.RemoteControl.Host.dll"); + // GetDotnetMajorVersion() will return the .NET SDK version. + // We may be building with TargetFramework being one version earlier. + if (!File.Exists(hostBinPath)) + { + version--; + runtimeVersionPath = $"net{version}.0"; + hostBinPath = Path.Combine(toolsPath, runtimeVersionPath, "Uno.UI.RemoteControl.Host.dll"); + } + if (!File.Exists(hostBinPath)) { typeof(Given_HotReloadWorkspace).Log().Error($"RCHost {hostBinPath} does not exist"); From b86c69229d955e233a91ad1329b9b79149c72204 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sun, 9 Jun 2024 08:26:32 +0300 Subject: [PATCH 04/19] chore: Adjust --- build/ci/.azure-devops-project-template-tests.yml | 10 ++++++++++ build/ci/.azure-devops-unit-tests.yml | 7 +++++++ build/ci/templates/dotnet-mobile-install-linux.yml | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index e65b778b19d6..4bc91ad9a35a 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -31,6 +31,11 @@ jobs: - script: copy $(System.ArtifactsDirectory)\NugetPackages\vslatest\*.nupkg $(Build.SourcesDirectory)\src\PackageCache displayName: Copy Artifacts to PackageCache + - script: | + cd src\SolutionTemplate\UnoAppAll\UnoAppAll.Mobile + dotnet workload restore + displayName: Workload restore + - task: PowerShell@2 displayName: Run Project Templates Tests inputs: @@ -79,6 +84,11 @@ jobs: - powershell: cp $(System.ArtifactsDirectory)/NugetPackages/vslatest/*.nupkg $(Build.SourcesDirectory)/src/PackageCache displayName: Copy Artifacts to PackageCache + - script: | + cd src\SolutionTemplate\UnoAppAll\UnoAppAll.Mobile + dotnet workload restore + displayName: Workload restore + - powershell: build/test-scripts/run-netcore-mobile-template-tests.ps1 displayName: Run Project Templates Tests env: diff --git a/build/ci/.azure-devops-unit-tests.yml b/build/ci/.azure-devops-unit-tests.yml index 731ead1a0e9e..078fcd82514e 100644 --- a/build/ci/.azure-devops-unit-tests.yml +++ b/build/ci/.azure-devops-unit-tests.yml @@ -52,6 +52,13 @@ jobs: - template: templates/dotnet-install.yml - template: templates/jdk-setup.yml + # We need just the .NET 8 runtime (not the SDK). + # Building with .NET 9 SDK is fine, but running the app when the TFM is net8.0 requires the .NET 8 runtime + - task: UseDotNet@2 + inputs: + packageType: 'runtime' + version: '8.x' + - task: DownloadBuildArtifacts@0 displayName: Download build artifact inputs: diff --git a/build/ci/templates/dotnet-mobile-install-linux.yml b/build/ci/templates/dotnet-mobile-install-linux.yml index e5ac51078ba8..11c194cb020c 100644 --- a/build/ci/templates/dotnet-mobile-install-linux.yml +++ b/build/ci/templates/dotnet-mobile-install-linux.yml @@ -1,5 +1,5 @@ parameters: - UnoCheck_Version: '1.23' + UnoCheck_Version: '1.23.0' steps: From 52f889ab97291da51291cda56a97ac2235a9aeab Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sun, 9 Jun 2024 09:16:53 +0300 Subject: [PATCH 05/19] chore: Update to preview 4 --- NuGet.Config | 2 ++ build/ci/net9/global.json | 4 ++-- src/Directory.Build.props | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 0d84f460e359..38faeeaace5a 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -3,6 +3,8 @@ + + diff --git a/build/ci/net9/global.json b/build/ci/net9/global.json index c9f6fd1949c2..ddd50822ca34 100644 --- a/build/ci/net9/global.json +++ b/build/ci/net9/global.json @@ -1,12 +1,12 @@ { "sdk": { - "version": "9.0.100-preview.3.24204.13", + "version": "9.0.100-preview.4.24267.66", // Change to false once we have stable 9.0 SDK "allowPrerelease": true, "rollForward": "disable" }, "tools": { - "dotnet": "9.0.100-preview.3.24204.13" + "dotnet": "9.0.100-preview.4.24267.66" }, "msbuild-sdks": { "MSBuild.Sdk.Extras": "3.0.44", diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 2d099a81e658..2f6383621eb8 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -72,7 +72,7 @@ - 4.10.0-3.final + 4.11.0-3.24307.3 From bb726a99f551b4fad5ea89a7da7ed353fea77f3d Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sun, 9 Jun 2024 09:52:42 +0300 Subject: [PATCH 06/19] chore: Workaround --- src/Directory.Build.props | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 2f6383621eb8..19fe2811aa5f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -248,6 +248,9 @@ $(NoWarn);CA1416 + + $(NoWarn);CS0436 + From bd13a4b85a37bf204d27506f99231c60a00dbc08 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sun, 9 Jun 2024 10:51:16 +0300 Subject: [PATCH 07/19] chore: Adjust --- build/ci/.azure-devops-project-template-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 4bc91ad9a35a..2a638e2da95d 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -32,7 +32,7 @@ jobs: displayName: Copy Artifacts to PackageCache - script: | - cd src\SolutionTemplate\UnoAppAll\UnoAppAll.Mobile + cd src/SolutionTemplate/UnoAppAll/UnoAppAll.Mobile dotnet workload restore displayName: Workload restore @@ -85,7 +85,7 @@ jobs: displayName: Copy Artifacts to PackageCache - script: | - cd src\SolutionTemplate\UnoAppAll\UnoAppAll.Mobile + cd src/SolutionTemplate/UnoAppAll/UnoAppAll.Mobile dotnet workload restore displayName: Workload restore From cac7ffe446b8f5d97565ff43cce3687b888f2c70 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Mon, 10 Jun 2024 16:18:53 +0300 Subject: [PATCH 08/19] chore: Adjust workload installation --- build/ci/.azure-devops-android-tests.yml | 5 ----- build/ci/.azure-devops-docs.yml | 5 ----- build/ci/.azure-devops-ios-tests.yml | 10 ---------- build/ci/.azure-devops-macos.yml | 5 ----- build/ci/.azure-devops-package-netcoremobile.yml | 5 ----- build/ci/.azure-devops-project-template-tests.yml | 10 ---------- build/ci/.azure-devops-uwp-convert.yml | 5 ----- build/ci/templates/dotnet-mobile-install-linux.yml | 2 +- build/ci/templates/dotnet-mobile-install-mac.yml | 2 +- build/ci/templates/dotnet-mobile-install-windows.yml | 2 +- 10 files changed, 3 insertions(+), 48 deletions(-) diff --git a/build/ci/.azure-devops-android-tests.yml b/build/ci/.azure-devops-android-tests.yml index ed8964e2ec59..af0e7ead6c59 100644 --- a/build/ci/.azure-devops-android-tests.yml +++ b/build/ci/.azure-devops-android-tests.yml @@ -48,11 +48,6 @@ jobs: - template: templates/gitversion.yml - - script: | - cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.netcoremobile - dotnet workload restore - displayName: Workload restore - - bash: | cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.netcoremobile dotnet publish -f net8.0-android -c Release -p:UnoTargetFrameworkOverride=net8.0-android /bl:$(build.artifactstagingdirectory)/android-netcoremobile-sampleapp.binlog diff --git a/build/ci/.azure-devops-docs.yml b/build/ci/.azure-devops-docs.yml index 56b44b1e7425..27f2e86defde 100644 --- a/build/ci/.azure-devops-docs.yml +++ b/build/ci/.azure-devops-docs.yml @@ -27,11 +27,6 @@ jobs: - template: templates/dotnet-mobile-install-windows.yml - - script: | - cd src/Uno.UI - dotnet workload restore Uno.UI.netcoremobile.csproj - displayName: Workload restore - - template: templates/gitversion.yml - template: templates/jdk-setup.yml diff --git a/build/ci/.azure-devops-ios-tests.yml b/build/ci/.azure-devops-ios-tests.yml index 2d28b1e0d3ff..c2bd576cdf89 100644 --- a/build/ci/.azure-devops-ios-tests.yml +++ b/build/ci/.azure-devops-ios-tests.yml @@ -73,11 +73,6 @@ jobs: - template: templates/dotnet-mobile-install-mac.yml - - script: | - cd $(BUILD.SOURCESDIRECTORY)/src/SamplesApp/SamplesApp.netcoremobile - dotnet workload restore - displayName: Workload restore - - template: templates/ios-build-select-version.yml parameters: xCodeRoot: ${{ parameters.xCodeRootBuild }} @@ -155,11 +150,6 @@ jobs: - template: templates/dotnet-mobile-install-mac.yml - - script: | - cd $(BUILD.SOURCESDIRECTORY)/src/SamplesApp/SamplesApp.netcoremobile - dotnet workload restore - displayName: Workload restore - - template: templates/ios-build-select-version.yml parameters: xCodeRoot: ${{ parameters.xCodeRootBuild }} diff --git a/build/ci/.azure-devops-macos.yml b/build/ci/.azure-devops-macos.yml index 5509426194a3..c326680c7175 100644 --- a/build/ci/.azure-devops-macos.yml +++ b/build/ci/.azure-devops-macos.yml @@ -25,11 +25,6 @@ jobs: - template: templates/dotnet-mobile-install-mac.yml - - script: | - cd src/SamplesApp/SamplesApp.netcoremobile - dotnet workload restore - displayName: Workload restore - - template: templates/nuget-cache.yml parameters: nugetPackages: $(NUGET_PACKAGES) diff --git a/build/ci/.azure-devops-package-netcoremobile.yml b/build/ci/.azure-devops-package-netcoremobile.yml index 4a7893519236..4d3c860b29b8 100644 --- a/build/ci/.azure-devops-package-netcoremobile.yml +++ b/build/ci/.azure-devops-package-netcoremobile.yml @@ -51,11 +51,6 @@ jobs: - template: templates/dotnet-mobile-install-windows.yml - - script: | - cd src/Uno.UI - dotnet workload restore Uno.UI.netcoremobile.csproj - displayName: Workload restore - # This task is required to run in separately to avoid hitting targets file # caching issues with msbuild 17.3 or later - task: DotNetCoreCLI@2 diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 2a638e2da95d..e65b778b19d6 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -31,11 +31,6 @@ jobs: - script: copy $(System.ArtifactsDirectory)\NugetPackages\vslatest\*.nupkg $(Build.SourcesDirectory)\src\PackageCache displayName: Copy Artifacts to PackageCache - - script: | - cd src/SolutionTemplate/UnoAppAll/UnoAppAll.Mobile - dotnet workload restore - displayName: Workload restore - - task: PowerShell@2 displayName: Run Project Templates Tests inputs: @@ -84,11 +79,6 @@ jobs: - powershell: cp $(System.ArtifactsDirectory)/NugetPackages/vslatest/*.nupkg $(Build.SourcesDirectory)/src/PackageCache displayName: Copy Artifacts to PackageCache - - script: | - cd src/SolutionTemplate/UnoAppAll/UnoAppAll.Mobile - dotnet workload restore - displayName: Workload restore - - powershell: build/test-scripts/run-netcore-mobile-template-tests.ps1 displayName: Run Project Templates Tests env: diff --git a/build/ci/.azure-devops-uwp-convert.yml b/build/ci/.azure-devops-uwp-convert.yml index 4af9eacc4c7c..6eea254a1a00 100644 --- a/build/ci/.azure-devops-uwp-convert.yml +++ b/build/ci/.azure-devops-uwp-convert.yml @@ -33,11 +33,6 @@ jobs: - template: templates/dotnet-mobile-install-windows.yml - - script: | - cd src/Uno.UI - dotnet workload restore Uno.UI.netcoremobile.csproj - displayName: Workload restore - - powershell: | cd $(build.sourcesdirectory)\src\Uno.WinUIRevert dotnet run "$(build.sourcesdirectory)" diff --git a/build/ci/templates/dotnet-mobile-install-linux.yml b/build/ci/templates/dotnet-mobile-install-linux.yml index 11c194cb020c..3327ba4d2908 100644 --- a/build/ci/templates/dotnet-mobile-install-linux.yml +++ b/build/ci/templates/dotnet-mobile-install-linux.yml @@ -1,5 +1,5 @@ parameters: - UnoCheck_Version: '1.23.0' + UnoCheck_Version: '1.24.0-dev.12' steps: diff --git a/build/ci/templates/dotnet-mobile-install-mac.yml b/build/ci/templates/dotnet-mobile-install-mac.yml index c0b6c015e774..b020eb7a976d 100644 --- a/build/ci/templates/dotnet-mobile-install-mac.yml +++ b/build/ci/templates/dotnet-mobile-install-mac.yml @@ -1,5 +1,5 @@ parameters: - UnoCheck_Version: '1.23.0' + UnoCheck_Version: '1.24.0-dev.12' steps: diff --git a/build/ci/templates/dotnet-mobile-install-windows.yml b/build/ci/templates/dotnet-mobile-install-windows.yml index c0b6c015e774..b020eb7a976d 100644 --- a/build/ci/templates/dotnet-mobile-install-windows.yml +++ b/build/ci/templates/dotnet-mobile-install-windows.yml @@ -1,5 +1,5 @@ parameters: - UnoCheck_Version: '1.23.0' + UnoCheck_Version: '1.24.0-dev.12' steps: From 90ce3ca0e9657a7fc43520b1349266ec9102d1cc Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Mon, 10 Jun 2024 16:39:32 +0300 Subject: [PATCH 09/19] chore: Remove comment that GitHub Actions don't like --- build/ci/net9/global.json | 1 - 1 file changed, 1 deletion(-) diff --git a/build/ci/net9/global.json b/build/ci/net9/global.json index ddd50822ca34..81b3831f2ed0 100644 --- a/build/ci/net9/global.json +++ b/build/ci/net9/global.json @@ -1,7 +1,6 @@ { "sdk": { "version": "9.0.100-preview.4.24267.66", - // Change to false once we have stable 9.0 SDK "allowPrerelease": true, "rollForward": "disable" }, From 9d98492e6192f12a75544761c1a52c025e14e5b3 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Mon, 10 Jun 2024 17:53:21 +0300 Subject: [PATCH 10/19] chore: Adjust --- .github/workflows/uwp-autoconvert.yml | 2 +- build/ci/templates/dotnet-mobile-install-linux.yml | 2 +- build/ci/templates/dotnet-mobile-install-mac.yml | 2 +- build/ci/templates/dotnet-mobile-install-windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/uwp-autoconvert.yml b/.github/workflows/uwp-autoconvert.yml index 7fd8060bd3cc..42aded4b8d45 100644 --- a/.github/workflows/uwp-autoconvert.yml +++ b/.github/workflows/uwp-autoconvert.yml @@ -73,7 +73,7 @@ jobs: & dotnet tool update --global uno.check --version $env:UnoCheck_Version --add-source https://api.nuget.org/v3/index.json name: Install Uno Check - run: | - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac + & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --pre-major name: Run uno-check - name: Convert source tree to UWP diff --git a/build/ci/templates/dotnet-mobile-install-linux.yml b/build/ci/templates/dotnet-mobile-install-linux.yml index 3327ba4d2908..91131dc7d491 100644 --- a/build/ci/templates/dotnet-mobile-install-linux.yml +++ b/build/ci/templates/dotnet-mobile-install-linux.yml @@ -18,6 +18,6 @@ steps: - bash: | dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json # androidsdk disabled for https://github.com/unoplatform/uno.check/issues/241 - uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 + uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --pre-major displayName: Install .NET Workloads retryCountOnTaskFailure: 3 diff --git a/build/ci/templates/dotnet-mobile-install-mac.yml b/build/ci/templates/dotnet-mobile-install-mac.yml index b020eb7a976d..7e39cc442621 100644 --- a/build/ci/templates/dotnet-mobile-install-mac.yml +++ b/build/ci/templates/dotnet-mobile-install-mac.yml @@ -9,7 +9,7 @@ steps: - powershell: | & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac + & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --pre-major displayName: Install .NET Workloads errorActionPreference: continue ignoreLASTEXITCODE: true diff --git a/build/ci/templates/dotnet-mobile-install-windows.yml b/build/ci/templates/dotnet-mobile-install-windows.yml index b020eb7a976d..7e39cc442621 100644 --- a/build/ci/templates/dotnet-mobile-install-windows.yml +++ b/build/ci/templates/dotnet-mobile-install-windows.yml @@ -9,7 +9,7 @@ steps: - powershell: | & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac + & uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --pre-major displayName: Install .NET Workloads errorActionPreference: continue ignoreLASTEXITCODE: true From 05bd1fe99b1d2ae00329e012260cc0835def1da1 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Mon, 10 Jun 2024 23:44:20 +0300 Subject: [PATCH 11/19] chore: Adjust Wasm --- src/Directory.Build.targets | 4 ++-- .../5.1/uno51blank/Directory.Packages.props | 6 +++--- .../5.1/uno51recommended/Directory.Packages.props | 6 +++--- .../MyAppXamlTrim.Wasm/MyAppXamlTrim.Wasm.csproj | 4 ++-- .../UnoAppAll/UnoAppAll.Wasm/UnoAppAll.Wasm.csproj | 4 ++-- .../UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj | 4 ++-- .../UnoAppWinUILinuxValidation.Wasm.csproj | 4 ++-- src/Uno.Sdk/packages.json | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index d2ebc0033d6f..0cc84e3b1769 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -76,8 +76,8 @@ - - + + diff --git a/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props b/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props index a5863c924654..c352bc14336b 100644 --- a/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props +++ b/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props @@ -29,9 +29,9 @@ - - - + + + diff --git a/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props b/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props index 22da180114a9..494b552cd2ea 100644 --- a/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props +++ b/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props @@ -59,9 +59,9 @@ - - - + + + diff --git a/src/SolutionTemplate/MyAppXamlTrim/MyAppXamlTrim.Wasm/MyAppXamlTrim.Wasm.csproj b/src/SolutionTemplate/MyAppXamlTrim/MyAppXamlTrim.Wasm/MyAppXamlTrim.Wasm.csproj index 39dd1e1fdba9..244f8f441fff 100644 --- a/src/SolutionTemplate/MyAppXamlTrim/MyAppXamlTrim.Wasm/MyAppXamlTrim.Wasm.csproj +++ b/src/SolutionTemplate/MyAppXamlTrim/MyAppXamlTrim.Wasm/MyAppXamlTrim.Wasm.csproj @@ -50,8 +50,8 @@ - - + + diff --git a/src/SolutionTemplate/UnoAppAll/UnoAppAll.Wasm/UnoAppAll.Wasm.csproj b/src/SolutionTemplate/UnoAppAll/UnoAppAll.Wasm/UnoAppAll.Wasm.csproj index ca3452bf7396..5303328b4c77 100644 --- a/src/SolutionTemplate/UnoAppAll/UnoAppAll.Wasm/UnoAppAll.Wasm.csproj +++ b/src/SolutionTemplate/UnoAppAll/UnoAppAll.Wasm/UnoAppAll.Wasm.csproj @@ -46,8 +46,8 @@ - - + + diff --git a/src/SolutionTemplate/UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj b/src/SolutionTemplate/UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj index 802d5c46599f..0611d4a1f886 100644 --- a/src/SolutionTemplate/UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj +++ b/src/SolutionTemplate/UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj @@ -52,8 +52,8 @@ - - + + diff --git a/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj b/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj index 811e96a13b51..4a4ce91d0b14 100644 --- a/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj +++ b/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj @@ -52,8 +52,8 @@ - - + + diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index c310ff4b6033..2f51155f9fdc 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -31,7 +31,7 @@ "Uno.Wasm.Bootstrap.Server" ], "versionOverride": { - "net9.0": "9.0.0-dev.47" + "net9.0": "9.0.0-dev.86" } }, { From e8b0fa88d9d904edf2817c7d04f0bcfed0e50003 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 11 Jun 2024 08:37:23 +0300 Subject: [PATCH 12/19] chore: Log --- build/test-scripts/wasm-run-automated-uitests.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build/test-scripts/wasm-run-automated-uitests.sh b/build/test-scripts/wasm-run-automated-uitests.sh index 9b14c28eb8cc..2b2d80bea4f4 100755 --- a/build/test-scripts/wasm-run-automated-uitests.sh +++ b/build/test-scripts/wasm-run-automated-uitests.sh @@ -83,9 +83,15 @@ dotnet test \ -v m \ || true +echo "Killing dotnet serve" + +jobs + ## terminate dotnet serve kill %% +echo "Killed!" + ## Copy the results file to the results folder cp --backup=t $UNO_ORIGINAL_TEST_RESULTS $UNO_UITEST_SCREENSHOT_PATH @@ -102,8 +108,13 @@ cp $BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.UITests/TestResults/*/*.xml pushd $BUILD_SOURCESDIRECTORY/src/Uno.NUnitTransformTool mkdir -p $(dirname ${UNO_TESTS_FAILED_LIST}) +echo "Running NUnitTransformTool" + dotnet run list-failed $UNO_ORIGINAL_TEST_RESULTS $UNO_TESTS_FAILED_LIST ## Fail the build when no test results could be read dotnet run fail-empty $UNO_ORIGINAL_TEST_RESULTS + +echo "Ran NUnitTransformTool" + popd From d4ef3f3ba982d497f3a9ffc833bc1224867b69b2 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 11 Jun 2024 15:12:57 +0300 Subject: [PATCH 13/19] chore: Workaround --- build/test-scripts/wasm-run-automated-uitests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/test-scripts/wasm-run-automated-uitests.sh b/build/test-scripts/wasm-run-automated-uitests.sh index 2b2d80bea4f4..8dbae0ee3c9d 100755 --- a/build/test-scripts/wasm-run-automated-uitests.sh +++ b/build/test-scripts/wasm-run-automated-uitests.sh @@ -19,6 +19,10 @@ dotnet tool uninstall dotnet-serve --tool-path $BUILD_SOURCESDIRECTORY/build/too dotnet tool install dotnet-serve --version 1.10.140 --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true export PATH="$PATH:$BUILD_SOURCESDIRECTORY/build/tools" +# Workaround an issue where dotnet test gets stuck. +# If this is removed and everything works, then remove it! :) +export MSBUILDENSURESTDOUTFORTASKPROCESSES=1 + export UNO_UITEST_TARGETURI=http://localhost:8000 export UNO_UITEST_DRIVERPATH_CHROME=$BUILD_SOURCESDIRECTORY/build/wasm-uitest-binaries/node_modules/chromedriver/lib/chromedriver export UNO_UITEST_CHROME_BINARY_PATH=~/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome From a2ed1909983638b5f0858395e8af5bc251ac709c Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 11 Jun 2024 16:38:44 +0300 Subject: [PATCH 14/19] chore: Update bootstrapper --- src/Uno.Sdk/packages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index 2f51155f9fdc..dc476260575c 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -24,7 +24,7 @@ }, { "group": "WasmBootstrap", - "version": "8.0.14", + "version": "8.0.16", "packages": [ "Uno.Wasm.Bootstrap", "Uno.Wasm.Bootstrap.DevServer", From b4f0838108a199b968d2b078d281cb3c7c58309a Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 12 Jun 2024 09:22:02 +0300 Subject: [PATCH 15/19] chore: Workaround #17097 --- .../Tests/HotReload/Frame/HRApp/global.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/global.json diff --git a/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/global.json b/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/global.json new file mode 100644 index 000000000000..5ed215fbae9b --- /dev/null +++ b/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "8.0.300", + "allowPrerelease": false + } +} \ No newline at end of file From bd98a9c149672560c50823ea978e3ceec72f9b3c Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 12 Jun 2024 10:20:54 +0300 Subject: [PATCH 16/19] chore: Adjust --- src/Uno.UWPSyncGenerator/Uno.UWPSyncGenerator.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uno.UWPSyncGenerator/Uno.UWPSyncGenerator.csproj b/src/Uno.UWPSyncGenerator/Uno.UWPSyncGenerator.csproj index 63a45aecc330..4390a978de7d 100644 --- a/src/Uno.UWPSyncGenerator/Uno.UWPSyncGenerator.csproj +++ b/src/Uno.UWPSyncGenerator/Uno.UWPSyncGenerator.csproj @@ -2,7 +2,7 @@ Exe - $(NetPrevious) + $(NetCurrent) false Major From 7be1f1eb6ebec79af03b8bdd2209f3cfa4cd24b1 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 12 Jun 2024 11:33:51 +0300 Subject: [PATCH 17/19] chore: typo --- .../UnoAppWinUILinuxValidation.Wasm.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj b/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj index 4a4ce91d0b14..9c5868bed979 100644 --- a/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj +++ b/src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj @@ -53,7 +53,7 @@ - From 5c5ab963f4c9e1c6cf45a12f5ef9501ee1ab065b Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jun 2024 16:13:38 +0300 Subject: [PATCH 18/19] chore: Update --- src/Uno.Sdk/packages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index dc476260575c..99e984d7adbe 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -24,7 +24,7 @@ }, { "group": "WasmBootstrap", - "version": "8.0.16", + "version": "8.0.17", "packages": [ "Uno.Wasm.Bootstrap", "Uno.Wasm.Bootstrap.DevServer", From f9c2b6abf55c46731fdf7f8c13cdbc853ffeb35e Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jun 2024 16:23:13 +0300 Subject: [PATCH 19/19] chore: Allow prerelease When building using msbuild instead of dotnet, .NET SDK preview versions are not picked up by default. --- src/SolutionTemplate/5.1/uno51blank/global.json | 3 +++ src/SolutionTemplate/5.1/uno51recommended/global.json | 3 +++ src/SolutionTemplate/5.2/uno52AppWithLib/global.json | 3 +++ src/SolutionTemplate/5.2/uno52Lib/global.json | 3 +++ src/SolutionTemplate/5.2/uno52NuGetLib/global.json | 3 +++ src/SolutionTemplate/5.2/uno52SingleProjectLib/global.json | 3 +++ src/SolutionTemplate/5.2/uno52blank/global.json | 3 +++ 7 files changed, 21 insertions(+) diff --git a/src/SolutionTemplate/5.1/uno51blank/global.json b/src/SolutionTemplate/5.1/uno51blank/global.json index 00907516f30f..bb72a7b6cd0d 100644 --- a/src/SolutionTemplate/5.1/uno51blank/global.json +++ b/src/SolutionTemplate/5.1/uno51blank/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. "msbuild-sdks": { "Uno.Sdk.Private": "5.1.50", diff --git a/src/SolutionTemplate/5.1/uno51recommended/global.json b/src/SolutionTemplate/5.1/uno51recommended/global.json index 00907516f30f..1c3bfec55379 100644 --- a/src/SolutionTemplate/5.1/uno51recommended/global.json +++ b/src/SolutionTemplate/5.1/uno51recommended/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. "msbuild-sdks": { "Uno.Sdk.Private": "5.1.50", diff --git a/src/SolutionTemplate/5.2/uno52AppWithLib/global.json b/src/SolutionTemplate/5.2/uno52AppWithLib/global.json index 51a79d8fccc2..874a8cfb4e57 100644 --- a/src/SolutionTemplate/5.2/uno52AppWithLib/global.json +++ b/src/SolutionTemplate/5.2/uno52AppWithLib/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. "msbuild-sdks": { "Uno.Sdk.Private": "5.2.0-dev.2002" diff --git a/src/SolutionTemplate/5.2/uno52Lib/global.json b/src/SolutionTemplate/5.2/uno52Lib/global.json index 508e1101d94c..d4fb5ba72f89 100644 --- a/src/SolutionTemplate/5.2/uno52Lib/global.json +++ b/src/SolutionTemplate/5.2/uno52Lib/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, "msbuild-sdks": { "Uno.Sdk.Private": "5.2.0-dev.2002" } diff --git a/src/SolutionTemplate/5.2/uno52NuGetLib/global.json b/src/SolutionTemplate/5.2/uno52NuGetLib/global.json index 508e1101d94c..d4fb5ba72f89 100644 --- a/src/SolutionTemplate/5.2/uno52NuGetLib/global.json +++ b/src/SolutionTemplate/5.2/uno52NuGetLib/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, "msbuild-sdks": { "Uno.Sdk.Private": "5.2.0-dev.2002" } diff --git a/src/SolutionTemplate/5.2/uno52SingleProjectLib/global.json b/src/SolutionTemplate/5.2/uno52SingleProjectLib/global.json index 508e1101d94c..d4fb5ba72f89 100644 --- a/src/SolutionTemplate/5.2/uno52SingleProjectLib/global.json +++ b/src/SolutionTemplate/5.2/uno52SingleProjectLib/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, "msbuild-sdks": { "Uno.Sdk.Private": "5.2.0-dev.2002" } diff --git a/src/SolutionTemplate/5.2/uno52blank/global.json b/src/SolutionTemplate/5.2/uno52blank/global.json index 51a79d8fccc2..874a8cfb4e57 100644 --- a/src/SolutionTemplate/5.2/uno52blank/global.json +++ b/src/SolutionTemplate/5.2/uno52blank/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "allowPrerelease": true + }, // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. "msbuild-sdks": { "Uno.Sdk.Private": "5.2.0-dev.2002"