From b45250cb2db41b2befe9be93c3c82e1959066ac7 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 15:53:57 -0400 Subject: [PATCH 01/38] chore: Bump iOS min version --- .../SamplesApp.netcoremobile/SamplesApp.netcoremobile.csproj | 2 +- src/SamplesApp/SamplesApp.netcoremobile/iOS/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SamplesApp/SamplesApp.netcoremobile/SamplesApp.netcoremobile.csproj b/src/SamplesApp/SamplesApp.netcoremobile/SamplesApp.netcoremobile.csproj index 5fb109dddf45..365b99d68b45 100644 --- a/src/SamplesApp/SamplesApp.netcoremobile/SamplesApp.netcoremobile.csproj +++ b/src/SamplesApp/SamplesApp.netcoremobile/SamplesApp.netcoremobile.csproj @@ -65,7 +65,7 @@ - 12.0 + 12.2 $(MtouchExtraArgs) --weak-framework=NewsstandKit diff --git a/src/SamplesApp/SamplesApp.netcoremobile/iOS/Info.plist b/src/SamplesApp/SamplesApp.netcoremobile/iOS/Info.plist index c25287f8770d..8b5810a14090 100644 --- a/src/SamplesApp/SamplesApp.netcoremobile/iOS/Info.plist +++ b/src/SamplesApp/SamplesApp.netcoremobile/iOS/Info.plist @@ -9,7 +9,7 @@ LSRequiresIPhoneOS MinimumOSVersion - 12.0 + 12.2 UIDeviceFamily 1 From 9380ec90c1567262d7a2a47c522c7b8507196a57 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 15:54:52 -0400 Subject: [PATCH 02/38] chore: Mark RethrowNativeExceptions as deprecated --- src/Uno.Foundation/FoundationFeatureConfiguration.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Uno.Foundation/FoundationFeatureConfiguration.cs b/src/Uno.Foundation/FoundationFeatureConfiguration.cs index 5ea990c914e9..dd873625d13d 100644 --- a/src/Uno.Foundation/FoundationFeatureConfiguration.cs +++ b/src/Uno.Foundation/FoundationFeatureConfiguration.cs @@ -34,8 +34,9 @@ internal static void RestoreDefaults() public static class Runtime { /// - /// Indicates if exception thrown in javascript should be rethrown in managed code. + /// [Deprecated] Indicates if exception thrown in javascript should be rethrown in managed code. /// + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static bool RethrowNativeExceptions { // Obsolete, remove in next major From d3312b275e3889c7c8bb8facd1b3ab7bb650d237 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 15:55:38 -0400 Subject: [PATCH 03/38] feat: Add Microsoft.NET.Sdk.WebAssembly support --- src/Directory.Build.targets | 4 ++-- src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj | 4 ++-- .../Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets | 10 +++++++++- src/Uno.Sdk/Sdk/Sdk.props | 11 +++++++++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 7d77c0a2e11a..9141138f363b 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -75,8 +75,8 @@ - - + + diff --git a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj index 6cde9d59a42d..d1490ac1a280 100644 --- a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj +++ b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj @@ -1,5 +1,5 @@ - + $(NetWasmPreviousAndCurrent) @@ -9,7 +9,7 @@ Exe $(DefineConstants);__WASM__;HAS_UNO;UNO_REFERENCE_API - $(NoWarn);NU1701;CS1998;NU1504;UXAML0002 + $(NoWarn);NU1701;CS1998;NU1504;UXAML0002;NU1903;NU1902;IL2026;IL2072;IL2067;IL2075;IL2070;IL2077;IL2057 true true WebAssembly diff --git a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets index c699b59dd06f..88911ee423e9 100644 --- a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets +++ b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets @@ -107,13 +107,21 @@ + + <_UnoAddLibraryAssetsBeforeTargets> + $(_UnoAddLibraryAssetsBeforeTargets); + GetCopyToOutputDirectoryItems; + GenerateUnoWasmAssets; + + + + BeforeTargets="$(_UnoAddLibraryAssetsBeforeTargets)"> diff --git a/src/Uno.Sdk/Sdk/Sdk.props b/src/Uno.Sdk/Sdk/Sdk.props index 6607c72388de..dac3cfdb59ff 100644 --- a/src/Uno.Sdk/Sdk/Sdk.props +++ b/src/Uno.Sdk/Sdk/Sdk.props @@ -14,7 +14,14 @@ Copyright (C) Uno Platform Inc. All rights reserved. <_DefaultMicrosoftNETSdk Condition="$(SingleProject) != 'true' AND $(UnoSingleProject) != 'true' AND ($(MSBuildProjectName.EndsWith('.Wasm')) or $(MSBuildProjectName.EndsWith('.WebAssembly')))">Microsoft.NET.Sdk.Web - <_DefaultMicrosoftNETSdk Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browserwasm'" >Microsoft.NET.Sdk.Web + <_UnoUseMicrosoftNETSdkWebAssembly Condition=" + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browserwasm' + AND $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 9.0 + ">true + + <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' == '' ">Microsoft.NET.Sdk.Web + <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' == 'true' " >Microsoft.NET.Sdk.WebAssembly + <_DefaultMicrosoftNETSdk Condition=" $(_DefaultMicrosoftNETSdk) == '' ">Microsoft.NET.Sdk <_DefaultWasmOutputType Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browserwasm'">$(OutputType) @@ -73,7 +80,7 @@ Copyright (C) Uno Platform Inc. All rights reserved. VS to read the global properties and avoid showing a yellow icon being the result of a mismatch between runs of design-time builds (one build defining a FrameworkReference and another one not). --> - + From 5ef63677038d058f2c088ad604cf1c286127bd6e Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 16:59:35 -0400 Subject: [PATCH 04/38] chore: Use net9 build --- build/ci/.azure-devops-wasm-uitests.yml | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/build/ci/.azure-devops-wasm-uitests.yml b/build/ci/.azure-devops-wasm-uitests.yml index 53c9bf249900..dcab7f230f47 100644 --- a/build/ci/.azure-devops-wasm-uitests.yml +++ b/build/ci/.azure-devops-wasm-uitests.yml @@ -35,16 +35,16 @@ jobs: nugetPackages: $(NUGET_PACKAGES) - bash: | - dotnet msbuild /r /nr:false /p:Configuration=Release /p:UnoTargetFrameworkOverride=net8.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD)-uitest-net8-$(GitVersion.FullSemVer).binlog + dotnet publish /r /nr:false /p:Configuration=Release /p:UnoTargetFrameworkOverride=net9.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD)-uitest-net9-$(GitVersion.FullSemVer).binlog - displayName: 'Build sample app (net8.0)' + displayName: 'Build sample app (net9.0)' - task: CopyFiles@2 - displayName: 'Publish Wasm Site (net8.0)' + displayName: 'Publish Wasm Site (net9.0)' inputs: - SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/net8.0/dist + SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/net9.0/publish/wwwroot Contents: '**/*.*' - TargetFolder: $(build.artifactstagingdirectory)/site-net8.0-$(XAML_FLAVOR_BUILD) + TargetFolder: $(build.artifactstagingdirectory)/site-net9.0-$(XAML_FLAVOR_BUILD) CleanTargetFolder: false OverWrite: false flattenFolders: false @@ -69,7 +69,7 @@ jobs: variables: NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget - SITE_SUFFIX: 'net8.0' + SITE_SUFFIX: 'net9.0' steps: - checkout: self @@ -90,7 +90,7 @@ jobs: dotnet tool uninstall dotnet-serve --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true dotnet tool install dotnet-serve --version 1.10.140 --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true export PATH="$PATH:$BUILD_SOURCESDIRECTORY/build/tools" - $BUILD_SOURCESDIRECTORY/build/tools/dotnet-serve -p 8000 -d "$BUILD_SOURCESDIRECTORY/build/wasm-uitest-binaries/site-net8.0-UWP" & + $BUILD_SOURCESDIRECTORY/build/tools/dotnet-serve -p 8000 -d "$BUILD_SOURCESDIRECTORY/build/wasm-uitest-binaries/site-net9.0-UWP" & cd $BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.Wasm.UITests npm install node app @@ -129,22 +129,22 @@ jobs: strategy: matrix: - net8_default: - SITE_SUFFIX: 'net8.0-UWP' + net9_default: + SITE_SUFFIX: 'net9.0-UWP' UITEST_AUTOMATED_GROUP: 'Default' UITEST_TEST_TIMEOUT: '120s' IS_RUNTIME_TESTS: false IS_UI_TESTS: true - net8_benchmarks: - SITE_SUFFIX: 'net8.0-WinUI' + net9_benchmarks: + SITE_SUFFIX: 'net9.0-WinUI' UITEST_AUTOMATED_GROUP: 'Benchmarks' UITEST_TEST_TIMEOUT: '15m' IS_RUNTIME_TESTS: false IS_UI_TESTS: true - net8_uwp_runtimetests_group_00: - SITE_SUFFIX: 'net8.0-UWP' + net9_uwp_runtimetests_group_00: + SITE_SUFFIX: 'net9.0-UWP' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '20m' UITEST_RUNTIME_TEST_GROUP: 0 @@ -152,8 +152,8 @@ jobs: IS_RUNTIME_TESTS: true IS_UI_TESTS: false - net8_uwp_runtimetests_group_01: - SITE_SUFFIX: 'net8.0-UWP' + net9_uwp_runtimetests_group_01: + SITE_SUFFIX: 'net9.0-UWP' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '20m' UITEST_RUNTIME_TEST_GROUP: 1 @@ -161,8 +161,8 @@ jobs: IS_RUNTIME_TESTS: true IS_UI_TESTS: false - net8_uwp_runtimetests_group_02: - SITE_SUFFIX: 'net8.0-UWP' + net9_uwp_runtimetests_group_02: + SITE_SUFFIX: 'net9.0-UWP' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '20m' UITEST_RUNTIME_TEST_GROUP: 2 @@ -170,8 +170,8 @@ jobs: IS_RUNTIME_TESTS: true IS_UI_TESTS: false - net8_winui_runtimetests_group_00: - SITE_SUFFIX: 'net8.0-WinUI' + net9_winui_runtimetests_group_00: + SITE_SUFFIX: 'net9.0-WinUI' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '20m' UITEST_RUNTIME_TEST_GROUP: 0 @@ -179,8 +179,8 @@ jobs: IS_RUNTIME_TESTS: true IS_UI_TESTS: false - net8_winui_runtimetests_group_01: - SITE_SUFFIX: 'net8.0-WinUI' + net9_winui_runtimetests_group_01: + SITE_SUFFIX: 'net9.0-WinUI' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '20m' UITEST_RUNTIME_TEST_GROUP: 1 @@ -188,8 +188,8 @@ jobs: IS_RUNTIME_TESTS: true IS_UI_TESTS: false - net8_winui_runtimetests_group_02: - SITE_SUFFIX: 'net8.0-WinUI' + net9_winui_runtimetests_group_02: + SITE_SUFFIX: 'net9.0-WinUI' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '20m' UITEST_RUNTIME_TEST_GROUP: 2 From 1c9b3711b0ca896e3651e66a4a1f80d2e4f9c28f Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 17:19:07 -0400 Subject: [PATCH 05/38] chore: Adjust publish --- build/ci/.azure-devops-wasm-uitests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/.azure-devops-wasm-uitests.yml b/build/ci/.azure-devops-wasm-uitests.yml index dcab7f230f47..5517c59285c1 100644 --- a/build/ci/.azure-devops-wasm-uitests.yml +++ b/build/ci/.azure-devops-wasm-uitests.yml @@ -35,7 +35,7 @@ jobs: nugetPackages: $(NUGET_PACKAGES) - bash: | - dotnet publish /r /nr:false /p:Configuration=Release /p:UnoTargetFrameworkOverride=net9.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD)-uitest-net9-$(GitVersion.FullSemVer).binlog + dotnet publish -f net9.0 /r /nr:false /p:Configuration=Release /p:UnoTargetFrameworkOverride=net9.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD)-uitest-net9-$(GitVersion.FullSemVer).binlog displayName: 'Build sample app (net9.0)' From 77e20b8bd272512a7fe80f0b7fc3af750b78d8ec Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 19:43:05 -0400 Subject: [PATCH 06/38] chore: Adjust wasm sample app target --- src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj index d1490ac1a280..c11c0daf4a9e 100644 --- a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj +++ b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj @@ -1,7 +1,7 @@ - $(NetWasmPreviousAndCurrent) + $(NetCurrent) From d3db2eae2dd6babf6a516a984d676156a30f18ee Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 20:09:46 -0400 Subject: [PATCH 07/38] chore: Adjust publish --- build/ci/.azure-devops-wasm-uitests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/.azure-devops-wasm-uitests.yml b/build/ci/.azure-devops-wasm-uitests.yml index 5517c59285c1..dcab7f230f47 100644 --- a/build/ci/.azure-devops-wasm-uitests.yml +++ b/build/ci/.azure-devops-wasm-uitests.yml @@ -35,7 +35,7 @@ jobs: nugetPackages: $(NUGET_PACKAGES) - bash: | - dotnet publish -f net9.0 /r /nr:false /p:Configuration=Release /p:UnoTargetFrameworkOverride=net9.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD)-uitest-net9-$(GitVersion.FullSemVer).binlog + dotnet publish /r /nr:false /p:Configuration=Release /p:UnoTargetFrameworkOverride=net9.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD)-uitest-net9-$(GitVersion.FullSemVer).binlog displayName: 'Build sample app (net9.0)' From f932badf8a65d445fc49e638676302bd9e4eabfb Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 20:36:51 -0400 Subject: [PATCH 08/38] chore: Bump roslyn --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 2bade8325363..2da5c1d6d528 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -45,7 +45,7 @@ - 4.11.0-2.final + 4.12.0-1.final From 27ab643fa792cd022a31fa1ff52af59ce515ab2f Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 21:11:28 -0400 Subject: [PATCH 09/38] chore: Adjust publish path --- build/ci/.azure-devops-wasm-uitests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/.azure-devops-wasm-uitests.yml b/build/ci/.azure-devops-wasm-uitests.yml index dcab7f230f47..8ba323358a8c 100644 --- a/build/ci/.azure-devops-wasm-uitests.yml +++ b/build/ci/.azure-devops-wasm-uitests.yml @@ -42,7 +42,7 @@ jobs: - task: CopyFiles@2 displayName: 'Publish Wasm Site (net9.0)' inputs: - SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/net9.0/publish/wwwroot + SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/net9.0/browser-wasm/publish/wwwroot Contents: '**/*.*' TargetFolder: $(build.artifactstagingdirectory)/site-net9.0-$(XAML_FLAVOR_BUILD) CleanTargetFolder: false From b75c5f2d3513a244189c0c86edb44d25b4698d2c Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 22:03:05 -0400 Subject: [PATCH 10/38] chore: adjust for mono_bind_static_method --- .../SamplesApp.Wasm/WasmScripts/TestRunner.js | 20 ++++++------------- src/Uno.UI/ts/Clipboard.ts | 4 +--- src/Uno.UI/ts/Interop/ManagedObject.ts | 2 +- src/Uno.UI/ts/WindowManager.ts | 18 ++--------------- .../DataTransfer/DragAndDropExtension.ts | 2 +- .../Midi/MidiDeviceConnectionWatcher.ts | 4 +--- .../Windows/Devices/Geolocation/Geolocator.ts | 4 +--- .../ts/Windows/Devices/Midi/MidiInPort.ts | 3 +-- .../Windows/Devices/Sensors/Accelerometer.ts | 2 +- .../ts/Windows/Devices/Sensors/Gyrometer.ts | 2 +- .../ts/Windows/Devices/Sensors/LightSensor.ts | 3 +-- .../Windows/Devices/Sensors/Magnetometer.ts | 2 +- src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts | 6 ++---- .../Graphics/Display/DisplayInformation.ts | 8 ++------ .../Helpers/Theming/SystemThemeHelper.ts | 2 +- .../ts/Windows/Media/SpeechRecognizer.ts | 12 ++++------- .../Connectivity/NetworkInformation.ts | 4 +--- .../ts/Windows/Storage/NativeStorageItem.ts | 2 +- .../ts/Windows/Storage/StorageFolder.ts | 4 +--- .../UI/Core/SystemNavigationManager.ts | 4 +--- src/Uno.UI/ts/Windows/UI/Xaml/Application.ts | 2 +- .../ts/Windows/UI/Xaml/Input/FocusVisual.ts | 3 +-- .../ts/Windows/UI/Xaml/Media/FontFamily.ts | 6 ++---- 23 files changed, 35 insertions(+), 84 deletions(-) diff --git a/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js b/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js index 1cde8cd69a00..fd7a79689a6a 100644 --- a/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js +++ b/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js @@ -1,23 +1,15 @@ class SampleRunner { - static init() { + static async init() { if (!this._getAllTests) { - this._getAllTests = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:GetAllTests"); - this._runTest = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:RunTest"); - this._isTestDone = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:IsTestDone"); - this._getDisplayScreenScaling = this.getMethod("[SamplesApp.Wasm] SamplesApp.App:GetDisplayScreenScaling"); - } - } + const sampleAppExports = await Module.getAssemblyExports("SamplesApp.Wasm"); - static getMethod(methodName) { - var method = Module.mono_bind_static_method(methodName); - - if (!method) { - throw new `Method ${methodName} does not exist`; + this._getAllTests = sampleAppExports.SamplesApp.App.GetAllTests; + this._runTest = sampleAppExports.SamplesApp.App.RunTest; + this._isTestDone = sampleAppExports.SamplesApp.App.IsTestDone; + this._getDisplayScreenScaling = sampleAppExports.SamplesApp.App.GetDisplayScreenScaling; } - - return method; } static IsTestDone(test) { diff --git a/src/Uno.UI/ts/Clipboard.ts b/src/Uno.UI/ts/Clipboard.ts index 691384c85cd1..792eca15b710 100644 --- a/src/Uno.UI/ts/Clipboard.ts +++ b/src/Uno.UI/ts/Clipboard.ts @@ -63,9 +63,7 @@ namespace Uno.Utils { if ((globalThis).DotnetExports !== undefined) { Clipboard.dispatchContentChanged = (globalThis).DotnetExports.Uno.Windows.ApplicationModel.DataTransfer.Clipboard.DispatchContentChanged; } else { - Clipboard.dispatchContentChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.ApplicationModel.DataTransfer.Clipboard:DispatchContentChanged"); + throw `Unable to find dotnet exports`; } } Clipboard.dispatchContentChanged(); diff --git a/src/Uno.UI/ts/Interop/ManagedObject.ts b/src/Uno.UI/ts/Interop/ManagedObject.ts index 7493a31637ac..be798ea0fbfe 100644 --- a/src/Uno.UI/ts/Interop/ManagedObject.ts +++ b/src/Uno.UI/ts/Interop/ManagedObject.ts @@ -9,7 +9,7 @@ if (exports !== undefined) { ManagedObject.dispatchMethod = exports.Dispatch; } else { - ManagedObject.dispatchMethod = (Module).mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.Interop.JSObject:Dispatch"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/WindowManager.ts b/src/Uno.UI/ts/WindowManager.ts index dcecfe5dc850..74d1303ff7d4 100644 --- a/src/Uno.UI/ts/WindowManager.ts +++ b/src/Uno.UI/ts/WindowManager.ts @@ -1395,7 +1395,7 @@ namespace Uno.UI { if ((globalThis).DotnetExports !== undefined) { WindowManager.setDependencyPropertyValueMethod = (globalThis).DotnetExports.UnoUI.Uno.UI.Helpers.Automation.SetDependencyPropertyValue; } else { - WindowManager.setDependencyPropertyValueMethod = (Module).mono_bind_static_method("[Uno.UI] Uno.UI.Helpers.Automation:SetDependencyPropertyValue"); + throw `Unable to find dotnet exports`; } } @@ -1438,21 +1438,7 @@ namespace Uno.UI { WindowManager.focusInMethod = exports.Microsoft.UI.Xaml.Input.FocusManager.ReceiveFocusNative; WindowManager.dispatchSuspendingMethod = exports.Microsoft.UI.Xaml.Application.DispatchSuspending; } else { - if (!WindowManager.resizeMethod) { - WindowManager.resizeMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Window:Resize"); - } - - if (!WindowManager.dispatchEventMethod) { - WindowManager.dispatchEventMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.UIElement:DispatchEvent"); - } - - if (!WindowManager.focusInMethod) { - WindowManager.focusInMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Input.FocusManager:ReceiveFocusNative"); - } - - if (!WindowManager.dispatchSuspendingMethod) { - WindowManager.dispatchSuspendingMethod = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Application:DispatchSuspending"); - } + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts b/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts index e2699ffbb2ef..422217207683 100644 --- a/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts +++ b/src/Uno.UI/ts/Windows/ApplicationModel/DataTransfer/DragAndDropExtension.ts @@ -18,7 +18,7 @@ if ((globalThis).DotnetExports !== undefined) { DragDropExtension._dispatchDropEventMethod = (globalThis).DotnetExports.UnoUI.Windows.ApplicationModel.DataTransfer.DragDrop.Core.DragDropExtension.OnNativeDropEvent; } else { - DragDropExtension._dispatchDropEventMethod = (Module).mono_bind_static_method("[Uno.UI] Windows.ApplicationModel.DataTransfer.DragDrop.Core.DragDropExtension:OnNativeDropEvent"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts b/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts index 1551b3a4908e..7c88c08a4fc5 100644 --- a/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts +++ b/src/Uno.UI/ts/Windows/Devices/Enumeration/Internal/Providers/Midi/MidiDeviceConnectionWatcher.ts @@ -17,9 +17,7 @@ if ((globalThis).DotnetExports !== undefined) { MidiDeviceConnectionWatcher.dispatchStateChanged = (globalThis).DotnetExports.Uno.Uno.Devices.Enumeration.Internal.Providers.Midi.MidiDeviceConnectionWatcher.DispatchStateChanged; } else { - MidiDeviceConnectionWatcher.dispatchStateChanged = - (Module).mono_bind_static_method( - "[Uno] Uno.Devices.Enumeration.Internal.Providers.Midi.MidiDeviceConnectionWatcher:DispatchStateChanged"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts b/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts index b2a30c80cbf3..40cc967d4498 100644 --- a/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts +++ b/src/Uno.UI/ts/Windows/Devices/Geolocation/Geolocator.ts @@ -37,9 +37,7 @@ Geolocator.dispatchGeoposition = exports.DispatchGeoposition; } else { - Geolocator.dispatchAccessRequest = (Module).mono_bind_static_method("[Uno] Uno.Devices.Geolocation.Geolocator:DispatchAccessRequest"); - Geolocator.dispatchError = (Module).mono_bind_static_method("[Uno] Uno.Devices.Geolocation.Geolocator:DispatchError"); - Geolocator.dispatchGeoposition = (Module).mono_bind_static_method("[Uno] Uno.Devices.Geolocation.Geolocator:DispatchGeoposition"); + throw `Unable to find dotnet exports`; } Geolocator.interopInitialized = true; diff --git a/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts b/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts index a936a24978c5..ce1dcb2b09c2 100644 --- a/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts +++ b/src/Uno.UI/ts/Windows/Devices/Midi/MidiInPort.ts @@ -30,8 +30,7 @@ if ((globalThis).DotnetExports !== undefined) { MidiInPort.dispatchMessage = (globalThis).DotnetExports.Uno.Windows.Devices.Midi.MidiInPort.DispatchMessage; } else { - MidiInPort.dispatchMessage = (Module).mono_bind_static_method( - "[Uno] Windows.Devices.Midi.MidiInPort:DispatchMessage"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts index 4dfb7c70dca3..1ee74b899f0f 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/Accelerometer.ts @@ -16,7 +16,7 @@ namespace Windows.Devices.Sensors { Accelerometer.dispatchReading = exports.DispatchReading; } else { - this.dispatchReading = (Module).mono_bind_static_method("[Uno] Uno.Devices.Sensors.Accelerometer:DispatchReading"); + throw `Unable to find dotnet exports`; } return true; diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts index dbbbc418ab6b..f634e605bb23 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/Gyrometer.ts @@ -20,7 +20,7 @@ namespace Windows.Devices.Sensors { if ((globalThis).DotnetExports !== undefined) { this.dispatchReading = (globalThis).DotnetExports.Uno.Windows.Devices.Sensors.Gyrometer.DispatchReading; } else { - this.dispatchReading = (Module).mono_bind_static_method("[Uno] Windows.Devices.Sensors.Gyrometer:DispatchReading"); + throw `Unable to find dotnet exports`; } let GyroscopeClass: any = window.Gyroscope; this.gyroscope = new GyroscopeClass({ referenceFrame: "device" }); diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts index 4e32cbf8a312..6746f1eee0b2 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/LightSensor.ts @@ -24,8 +24,7 @@ namespace Windows.Devices.Sensors { if ((globalThis).DotnetExports !== undefined) { LightSensor.dispatchReading = (globalThis).DotnetExports.Uno.Windows.Devices.Sensors.LightSensor.DispatchReading; } else { - LightSensor.dispatchReading = (Module).mono_bind_static_method( - "[Uno] Windows.Devices.Sensors.LightSensor:DispatchReading"); + throw `Unable to find dotnet exports`; } const AmbientLightSensorClass: any = window.AmbientLightSensor; LightSensor.ambientLightSensor = new AmbientLightSensorClass(); diff --git a/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts b/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts index 5d6ec5919159..0f8395bee26f 100644 --- a/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts +++ b/src/Uno.UI/ts/Windows/Devices/Sensors/Magnetometer.ts @@ -20,7 +20,7 @@ namespace Windows.Devices.Sensors { if ((globalThis).DotnetExports !== undefined) { this.dispatchReading = (globalThis).DotnetExports.Uno.Windows.Devices.Sensors.Magnetometer.DispatchReading; } else { - this.dispatchReading = (Module).mono_bind_static_method("[Uno] Windows.Devices.Sensors.Magnetometer:DispatchReading"); + throw `Unable to find dotnet exports`; } let MagnetometerClass: any = window.Magnetometer; this.magnetometer = new MagnetometerClass({ referenceFrame: 'device' }); diff --git a/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts b/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts index af6186ddb0ce..e619c2640a98 100644 --- a/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts +++ b/src/Uno.UI/ts/Windows/Gaming/Input/Gamepad.ts @@ -68,8 +68,7 @@ if ((globalThis).DotnetExports !== undefined) { Gamepad.dispatchGamepadAdded = (globalThis).DotnetExports.Uno.Windows.Gaming.Input.Gamepad.DispatchGamepadAdded; } else { - Gamepad.dispatchGamepadAdded = (Module).mono_bind_static_method( - "[Uno] Windows.Gaming.Input.Gamepad:DispatchGamepadAdded"); + throw `Unable to find dotnet exports`; } } Gamepad.dispatchGamepadAdded(e.gamepad.index); @@ -80,8 +79,7 @@ if ((globalThis).DotnetExports !== undefined) { Gamepad.dispatchGamepadRemoved = (globalThis).DotnetExports.Uno.Windows.Gaming.Input.Gamepad.DispatchGamepadRemoved; } else { - Gamepad.dispatchGamepadRemoved = (Module).mono_bind_static_method( - "[Uno] Windows.Gaming.Input.Gamepad:DispatchGamepadRemoved"); + throw `Unable to find dotnet exports`; } } Gamepad.dispatchGamepadRemoved(e.gamepad.index); diff --git a/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts b/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts index 435d28bd02da..9aab5002c274 100644 --- a/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts +++ b/src/Uno.UI/ts/Windows/Graphics/Display/DisplayInformation.ts @@ -145,9 +145,7 @@ if ((globalThis).DotnetExports !== undefined) { DisplayInformation.dispatchDpiChanged = (globalThis).DotnetExports.Uno.Windows.Graphics.Display.DisplayInformation.DispatchDpiChanged; } else { - DisplayInformation.dispatchDpiChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.Graphics.Display.DisplayInformation:DispatchDpiChanged"); + throw `Unable to find dotnet exports`; } } DisplayInformation.dispatchDpiChanged(currentDpi); @@ -160,9 +158,7 @@ if ((globalThis).DotnetExports !== undefined) { DisplayInformation.dispatchOrientationChanged = (globalThis).DotnetExports.Uno.Windows.Graphics.Display.DisplayInformation.DispatchOrientationChanged; } else { - DisplayInformation.dispatchOrientationChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.Graphics.Display.DisplayInformation:DispatchOrientationChanged"); + throw `Unable to find dotnet exports`; } } DisplayInformation.dispatchOrientationChanged(window.screen.orientation.type); diff --git a/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts b/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts index 3e9d8cfcad5d..1686e2e91494 100644 --- a/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts +++ b/src/Uno.UI/ts/Windows/Helpers/Theming/SystemThemeHelper.ts @@ -20,7 +20,7 @@ namespace Uno.Helpers.Theming { if ((globalThis).DotnetExports !== undefined) { SystemThemeHelper.dispatchThemeChange = (globalThis).DotnetExports.Uno.Uno.Helpers.Theming.SystemThemeHelper.DispatchSystemThemeChange; } else { - SystemThemeHelper.dispatchThemeChange = (Module).mono_bind_static_method("[Uno] Uno.Helpers.Theming.SystemThemeHelper:DispatchSystemThemeChange"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts b/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts index 0e00ada75811..006c6cabd2ae 100644 --- a/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts +++ b/src/Uno.UI/ts/Windows/Media/SpeechRecognizer.ts @@ -69,8 +69,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchResult = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchResult; } else { - SpeechRecognizer.dispatchResult = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchResult"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchResult(this.managedId, event.results[0][0].transcript, event.results[0][0].confidence); @@ -79,8 +78,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchHypothesis = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchHypothesis; } else { - SpeechRecognizer.dispatchHypothesis = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchHypothesis"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchHypothesis(this.managedId, event.results[0][0].transcript); @@ -92,8 +90,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchStatus = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchStatus; } else { - SpeechRecognizer.dispatchStatus = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchStatus"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchStatus(this.managedId, "SpeechDetected") @@ -104,8 +101,7 @@ namespace Windows.Media { if ((globalThis).DotnetExports !== undefined) { SpeechRecognizer.dispatchError = (globalThis).DotnetExports.Uno.Windows.Media.SpeechRecognition.SpeechRecognizer.DispatchError; } else { - SpeechRecognizer.dispatchError = (Module).mono_bind_static_method( - "[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchError"); + throw `Unable to find dotnet exports`; } } SpeechRecognizer.dispatchError(this.managedId, event.error); diff --git a/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts b/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts index ff3b59d4f2ad..c71214070bc7 100644 --- a/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts +++ b/src/Uno.UI/ts/Windows/Networking/Connectivity/NetworkInformation.ts @@ -18,9 +18,7 @@ if ((globalThis).DotnetExports !== undefined) { NetworkInformation.dispatchStatusChanged = (globalThis).DotnetExports.Uno.Windows.Networking.Connectivity.NetworkInformation.DispatchStatusChanged; } else { - NetworkInformation.dispatchStatusChanged = - (Module).mono_bind_static_method( - "[Uno] Windows.Networking.Connectivity.NetworkInformation:DispatchStatusChanged"); + throw `Unable to find dotnet exports`; } } NetworkInformation.dispatchStatusChanged(); diff --git a/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts b/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts index 78851b35bb8b..3f11b2a89915 100644 --- a/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts +++ b/src/Uno.UI/ts/Windows/Storage/NativeStorageItem.ts @@ -78,7 +78,7 @@ if ((globalThis).DotnetExports !== undefined) { NativeStorageItem.generateGuidBinding = (globalThis).DotnetExports.Uno.Uno.Storage.NativeStorageItem.GenerateGuids; } else { - NativeStorageItem.generateGuidBinding = (Module).mono_bind_static_method("[Uno] Uno.Storage.NativeStorageItem:GenerateGuids"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts b/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts index 6e888b4fbeab..0cffda479e58 100644 --- a/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts +++ b/src/Uno.UI/ts/Windows/Storage/StorageFolder.ts @@ -70,9 +70,7 @@ namespace Windows.Storage { if ((globalThis).DotnetExports !== undefined) { StorageFolder.dispatchStorageInitialized = (globalThis).DotnetExports.Uno.Windows.Storage.StorageFolder.DispatchStorageInitialized; } else { - StorageFolder.dispatchStorageInitialized = - (Module).mono_bind_static_method( - "[Uno] Windows.Storage.StorageFolder:DispatchStorageInitialized"); + throw `Unable to find dotnet exports`; } } StorageFolder.dispatchStorageInitialized(); diff --git a/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts b/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts index 4a4b950f8ddc..ac595471bf6a 100644 --- a/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts +++ b/src/Uno.UI/ts/Windows/UI/Core/SystemNavigationManager.ts @@ -14,9 +14,7 @@ constructor() { var that = this; - var dispatchBackRequest = (globalThis).DotnetExports !== undefined ? - (globalThis).DotnetExports.Uno.Windows.UI.Core.SystemNavigationManager.DispatchBackRequest : - (Module).mono_bind_static_method("[Uno] Windows.UI.Core.SystemNavigationManager:DispatchBackRequest"); + var dispatchBackRequest = (globalThis).DotnetExports.Uno.Windows.UI.Core.SystemNavigationManager.DispatchBackRequest; window.history.replaceState(0, document.title, null); window.addEventListener("popstate", function (evt) { diff --git a/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts b/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts index c88b7aff863b..7d422ec8b0f9 100644 --- a/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts +++ b/src/Uno.UI/ts/Windows/UI/Xaml/Application.ts @@ -8,7 +8,7 @@ if ((globalThis).DotnetExports !== undefined) { Application.dispatchVisibilityChange = (globalThis).DotnetExports.UnoUI.Microsoft.UI.Xaml.Application.DispatchVisibilityChange; } else { - Application.dispatchVisibilityChange = (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Application:DispatchVisibilityChange"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts b/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts index 5f307f1d43fb..81e15e7049cf 100644 --- a/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts +++ b/src/Uno.UI/ts/Windows/UI/Xaml/Input/FocusVisual.ts @@ -28,8 +28,7 @@ if ((globalThis).DotnetExports !== undefined) { FocusVisual.dispatchPositionChange = (globalThis).DotnetExports.UnoUI.Uno.UI.Xaml.Controls.SystemFocusVisual.DispatchNativePositionChange; } else { - FocusVisual.dispatchPositionChange = (Module).mono_bind_static_method( - "[Uno.UI] Uno.UI.Xaml.Controls.SystemFocusVisual:DispatchNativePositionChange"); + throw `Unable to find dotnet exports`; } } diff --git a/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts b/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts index 7188e606701f..39598a90c6b7 100644 --- a/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts +++ b/src/Uno.UI/ts/Windows/UI/Xaml/Media/FontFamily.ts @@ -52,8 +52,7 @@ if ((globalThis).DotnetExports !== undefined) { FontFamily.managedNotifyFontLoaded = (globalThis).DotnetExports.UnoUI.Microsoft.UI.Xaml.Media.FontFamilyLoader.NotifyFontLoaded; } else { - FontFamily.managedNotifyFontLoaded = - (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Media.FontFamilyLoader:NotifyFontLoaded"); + throw `Unable to find dotnet exports`; } } @@ -66,8 +65,7 @@ if ((globalThis).DotnetExports !== undefined) { FontFamily.managedNotifyFontLoadFailed = (globalThis).DotnetExports.UnoUI.Microsoft.UI.Xaml.Media.FontFamilyLoader.NotifyFontLoadFailed; } else { - FontFamily.managedNotifyFontLoadFailed = - (Module).mono_bind_static_method("[Uno.UI] Microsoft.UI.Xaml.Media.FontFamilyLoader:NotifyFontLoadFailed"); + throw `Unable to find dotnet exports`; } } From 0220ecc4508188db547ae05535eaad6e4dc646fb Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 13 Sep 2024 23:31:55 -0400 Subject: [PATCH 11/38] chore: Move samples to jsimport --- src/SamplesApp/SamplesApp.Shared/App.Tests.cs | 15 +++++++++++++ src/SamplesApp/SamplesApp.Shared/App.xaml.cs | 10 +++++++++ .../SamplesApp.Wasm/SamplesApp.Wasm.csproj | 3 ++- .../SamplesApp.Wasm/WasmScripts/TestRunner.js | 22 ++++++++++--------- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/SamplesApp/SamplesApp.Shared/App.Tests.cs b/src/SamplesApp/SamplesApp.Shared/App.Tests.cs index 71f987b070d4..ca6513e729e4 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.Tests.cs +++ b/src/SamplesApp/SamplesApp.Shared/App.Tests.cs @@ -8,6 +8,7 @@ using Windows.UI.Core; using Uno.UI.RuntimeTests.Extensions; using Private.Infrastructure; +using System.Runtime.InteropServices.JavaScript; #if !HAS_UNO using Uno.Logging; @@ -30,8 +31,14 @@ partial class App private static ImmutableHashSet _doneTests = ImmutableHashSet.Empty; private static int _testIdCounter = 0; +#if __WASM__ + [System.Runtime.InteropServices.JavaScript.JSExport] +#endif public static string GetAllTests() => SampleControl.Presentation.SampleChooserViewModel.Instance.GetAllSamplesNames(); +#if __WASM__ + [System.Runtime.InteropServices.JavaScript.JSExport] +#endif public static bool IsTestDone(string testId) => int.TryParse(testId, out var id) ? _doneTests.Contains(id) : false; public static async Task HandleRuntimeTests(string args) @@ -65,6 +72,9 @@ await SampleControl.Presentation.SampleChooserViewModel.Instance.RunRuntimeTests return false; } +#if __WASM__ + [System.Runtime.InteropServices.JavaScript.JSExport] +#endif public static string RunTest(string metadataName) { if (_mainWindow is null) @@ -244,4 +254,9 @@ private bool TryNavigateToLaunchSample(string args) [Foundation.Export("getDisplayScreenScaling:")] // notice the colon at the end of the method name public Foundation.NSString GetDisplayScreenScalingBackdoor(Foundation.NSString value) => new Foundation.NSString(GetDisplayScreenScaling(value).ToString()); #endif + +#if __WASM__ + [JSImport("globalThis.SampleRunner.init")] + public static partial void InitWasmSampleRunner(); +#endif } diff --git a/src/SamplesApp/SamplesApp.Shared/App.xaml.cs b/src/SamplesApp/SamplesApp.Shared/App.xaml.cs index 02c6d131677f..e83136f8d66f 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.xaml.cs +++ b/src/SamplesApp/SamplesApp.Shared/App.xaml.cs @@ -127,6 +127,13 @@ override void OnLaunched(LaunchActivatedEventArgs e) #endif EnsureMainWindow(); +#if __WASM__ + DispatcherQueue.Main.TryEnqueue( + DispatcherQueuePriority.Low, + () => InitWasmSampleRunner() + ); +#endif + SetupAndroidEnvironment(); #if __IOS__ && !__MACCATALYST__ && !TESTFLIGHT @@ -611,6 +618,9 @@ static void ParseCommandLineFeatureFlags() #endif } +#if __WASM__ + [System.Runtime.InteropServices.JavaScript.JSExport] +#endif public static string GetDisplayScreenScaling(string displayId) => (DisplayInformation.GetForCurrentView().LogicalDpi * 100f / 96f).ToString(CultureInfo.InvariantCulture); } diff --git a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj index c11c0daf4a9e..9dfead971371 100644 --- a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj +++ b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj @@ -14,7 +14,8 @@ true WebAssembly false - + true + diff --git a/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js b/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js index fd7a79689a6a..03424c56e08b 100644 --- a/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js +++ b/src/SamplesApp/SamplesApp.Wasm/WasmScripts/TestRunner.js @@ -2,37 +2,39 @@ static async init() { - if (!this._getAllTests) { + if (!SampleRunner._getAllTests) { const sampleAppExports = await Module.getAssemblyExports("SamplesApp.Wasm"); - this._getAllTests = sampleAppExports.SamplesApp.App.GetAllTests; - this._runTest = sampleAppExports.SamplesApp.App.RunTest; - this._isTestDone = sampleAppExports.SamplesApp.App.IsTestDone; - this._getDisplayScreenScaling = sampleAppExports.SamplesApp.App.GetDisplayScreenScaling; + SampleRunner._getAllTests = sampleAppExports.SamplesApp.App.GetAllTests; + SampleRunner._runTest = sampleAppExports.SamplesApp.App.RunTest; + SampleRunner._isTestDone = sampleAppExports.SamplesApp.App.IsTestDone; + SampleRunner._getDisplayScreenScaling = sampleAppExports.SamplesApp.App.GetDisplayScreenScaling; } } static IsTestDone(test) { - SampleRunner.init(); - return this._isTestDone(test); + SampleRunner.init(); + return SampleRunner._isTestDone(test); } static RunTest(test) { SampleRunner.init(); - return this._runTest(test); + return SampleRunner._runTest(test); } static GetAllTests() { SampleRunner.init(); - return this._getAllTests(); + return SampleRunner._getAllTests(); } static GetDisplayScreenScaling(displayId) { SampleRunner.init(); - return this._getDisplayScreenScaling(displayId); + return SampleRunner._getDisplayScreenScaling(displayId); } static RefreshBrowser(unused) { window.location.reload(); } } + +globalThis.SampleRunner = SampleRunner; From daa80d74c43ff833e4cf44b32a79aabb7406547e Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Mon, 16 Sep 2024 11:01:57 -0400 Subject: [PATCH 12/38] chore: Adjust async helper --- .../Interop/Runtime.wasm.cs | 9 ++- src/Uno.UI/ts/Interop/AsyncInteropHelper.ts | 10 ++- src/Uno.UI/ts/Interop/EmscriptenPolyfill.ts | 72 +++++++++++++++++++ 3 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 src/Uno.UI/ts/Interop/EmscriptenPolyfill.ts diff --git a/src/Uno.Foundation.Runtime.WebAssembly/Interop/Runtime.wasm.cs b/src/Uno.Foundation.Runtime.WebAssembly/Interop/Runtime.wasm.cs index 982c579ddc24..e3910c719b4d 100644 --- a/src/Uno.Foundation.Runtime.WebAssembly/Interop/Runtime.wasm.cs +++ b/src/Uno.Foundation.Runtime.WebAssembly/Interop/Runtime.wasm.cs @@ -15,10 +15,11 @@ using Uno.Foundation.Logging; using System.Globalization; using Uno.Foundation.Runtime.WebAssembly.Helpers; +using System.Runtime.InteropServices.JavaScript; namespace Uno.Foundation { - public static class WebAssemblyRuntime + public static partial class WebAssemblyRuntime { private static Dictionary MethodMap = new Dictionary(); @@ -360,11 +361,13 @@ public static Task InvokeAsync(string promiseCode, CancellationToken ct) } [EditorBrowsable(EditorBrowsableState.Never)] - public static void DispatchAsyncResult(long handle, string result) + [JSExport] + public static void DispatchAsyncResult([JSMarshalAs] long handle, string result) => RemoveAsyncTask(handle)?.TrySetResult(result); [EditorBrowsable(EditorBrowsableState.Never)] - public static void DispatchAsyncError(long handle, string error) + [JSExport] + public static void DispatchAsyncError([JSMarshalAs] long handle, string error) => RemoveAsyncTask(handle)?.TrySetException(new ApplicationException(error)); private static TaskCompletionSource? RemoveAsyncTask(long handle) diff --git a/src/Uno.UI/ts/Interop/AsyncInteropHelper.ts b/src/Uno.UI/ts/Interop/AsyncInteropHelper.ts index 3ada13381def..17a344294e3d 100644 --- a/src/Uno.UI/ts/Interop/AsyncInteropHelper.ts +++ b/src/Uno.UI/ts/Interop/AsyncInteropHelper.ts @@ -4,15 +4,13 @@ private static dispatchResultMethod: (handle: number, result: string) => string; private static dispatchErrorMethod: (handle: number, error: string) => string; - private static init() { + private static async init() { if (AsyncInteropHelper.dispatchErrorMethod) { return; // already initialized } - const w = window as any; - AsyncInteropHelper.dispatchResultMethod = - w.Module.mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.WebAssemblyRuntime:DispatchAsyncResult"); - AsyncInteropHelper.dispatchErrorMethod = - w.Module.mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.WebAssemblyRuntime:DispatchAsyncError"); + + AsyncInteropHelper.dispatchResultMethod = (globalThis).DotnetExports.UnoFoundationRuntimeWebAssembly.Uno.Foundation.WebAssemblyRuntime.DispatchAsyncResult; + AsyncInteropHelper.dispatchErrorMethod = (globalThis).DotnetExports.UnoFoundationRuntimeWebAssembly.Uno.Foundation.WebAssemblyRuntime.DispatchAsyncError; } public static Invoke(handle: number, promiseFunction: () => Promise): void { diff --git a/src/Uno.UI/ts/Interop/EmscriptenPolyfill.ts b/src/Uno.UI/ts/Interop/EmscriptenPolyfill.ts new file mode 100644 index 000000000000..b50ba5474ed6 --- /dev/null +++ b/src/Uno.UI/ts/Interop/EmscriptenPolyfill.ts @@ -0,0 +1,72 @@ +namespace Uno.UI.Interop { + export class Emscripten { + + static assert(x: any, message: any) { + if (!x) throw new Error(message); + } + + static warnOnce(a: any, msg: any = null) { + if (!msg) { + msg = a; + a = false; + } + if (!a) { + (Emscripten).msgs ||= {}; + if (msg in (Emscripten).msgs) return; + (Emscripten).msgs[msg] = true; + console.warn(msg); + } + } + + // Copy of the stringToUTF8 function from the emscripten library + static stringToUTF8Array(str: any, heap: any, outIdx: any, maxBytesToWrite: any): number { + if (!(maxBytesToWrite > 0)) + return 0; + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; + for (var i = 0; i < str.length; ++i) { + var u = str.charCodeAt(i); + if (u >= 55296 && u <= 57343) { + var u1 = str.charCodeAt(++i); + u = 65536 + ((u & 1023) << 10) | u1 & 1023 + } + if (u <= 127) { + if (outIdx >= endIdx) + break; + heap[outIdx++] = u + } else if (u <= 2047) { + if (outIdx + 1 >= endIdx) + break; + heap[outIdx++] = 192 | u >> 6; + heap[outIdx++] = 128 | u & 63 + } else if (u <= 65535) { + if (outIdx + 2 >= endIdx) + break; + heap[outIdx++] = 224 | u >> 12; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63 + } else { + if (outIdx + 3 >= endIdx) + break; + if (u > 1114111) + Emscripten.warnOnce("Invalid Unicode code point " + (globalThis).Module.ptrToString(u) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."); + heap[outIdx++] = 240 | u >> 18; + heap[outIdx++] = 128 | u >> 12 & 63; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63 + } + } + heap[outIdx] = 0; + return outIdx - startIdx + } + + public static stringToUTF8(str: any, outPtr: any, maxBytesToWrite: any) { + Emscripten.assert(typeof maxBytesToWrite == "number", "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"); + return Emscripten.stringToUTF8Array(str, Module.HEAPU8, outPtr, maxBytesToWrite) + } + } +} + +if ((globalThis).stringToUTF8 == undefined) { + (globalThis).stringToUTF8 = Uno.UI.Interop.Emscripten.stringToUTF8; +} From b17a3592818e3e84651dfdcae5081ab57bf2d277 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Mon, 16 Sep 2024 11:02:23 -0400 Subject: [PATCH 13/38] chore: Adjust project transitive assets copy for wasm --- .../Content/uno.ui.tasks.assets.targets | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets index 88911ee423e9..5c98920186eb 100644 --- a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets +++ b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets @@ -209,7 +209,7 @@ - + BeforeTargets="GetCopyToPublishDirectoryItems" + Condition=" '$(UsingMicrosoftNETSdkWebAssembly)' != 'true' "> + %(TargetPath) PreserveNewest + + + + + <_UnoTransitiveItems Include="@(_TransitiveItemsToCopyToOutputDirectory)"> + + $([System.IO.Path]::GetDirectoryName('%(FullPath)')) + wwwroot/%(TargetPath) + + <_UnoTransitiveItems Remove="@(StaticWebAsset)" /> + + + + + + + + + + + From 071f00950c26076cf6b84a6d58d82faa33a8c0a8 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Mon, 16 Sep 2024 11:02:36 -0400 Subject: [PATCH 14/38] chore: Adjust linking for samples app wasm --- .../SamplesApp.Wasm/SamplesApp.Wasm.csproj | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj index 9dfead971371..3f2104347fae 100644 --- a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj +++ b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj @@ -9,7 +9,8 @@ Exe $(DefineConstants);__WASM__;HAS_UNO;UNO_REFERENCE_API - $(NoWarn);NU1701;CS1998;NU1504;UXAML0002;NU1903;NU1902;IL2026;IL2072;IL2067;IL2075;IL2070;IL2077;IL2057 + $(NoWarn);NU1701;CS1998;NU1504;UXAML0002;NU1903;NU1902 + $(NoWarn);IL2026;IL2072;IL2067;IL2075;IL2070;IL2077;IL2057;IL2045 true true WebAssembly @@ -22,6 +23,14 @@ + + false + + + false @@ -30,11 +39,6 @@ portable true - - false From 6405f7c03b3c30cae313ff68128fbd381fafa508 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Mon, 16 Sep 2024 21:42:41 -0400 Subject: [PATCH 15/38] chore: Recursive get output items --- src/Directory.Build.props | 3 ++ src/Directory.Build.targets | 6 +-- .../Content/uno.ui.tasks.assets.targets | 49 ++++++++++++++++++- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 2da5c1d6d528..9126e9947fbf 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -276,4 +276,7 @@ + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 9141138f363b..31af62bef031 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -65,7 +65,7 @@ - + @@ -75,8 +75,8 @@ - - + + diff --git a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets index 5c98920186eb..b8728a52bf0b 100644 --- a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets +++ b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets @@ -237,19 +237,27 @@ + + + $(UnoGenerateAssetsManifestDependsOn); + _UnoAssetsGetCopyToPublishDirectoryItems + + + - <_UnoTransitiveItems Include="@(_TransitiveItemsToCopyToOutputDirectory)"> + <_UnoTransitiveItems Include="@(UnoAllCopyToOutputItems)"> $([System.IO.Path]::GetDirectoryName('%(FullPath)')) wwwroot/%(TargetPath) + <_UnoTransitiveItems Remove="@(StaticWebAsset)" /> @@ -276,4 +284,41 @@ + + + + + + <_UnoGCKeepMetadata>CopyToPublishDirectory;ExcludeFromSingleFile;TargetPath + + + + + + + + + <_UnoSourceItemsToCopy + KeepDuplicates="false" + KeepMetadata="$(_UnoGCKeepMetadata)" + Include="@(_UnoAllChildProjectItemsWithTargetPath->'%(FullPath)')" + Condition="'%(_UnoAllChildProjectItemsWithTargetPath.CopyToPublishDirectory)'!='Never'"/> + + + + From d5a9f16fb71a2edeac5db1d194cc459046998ad4 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 10:21:53 -0400 Subject: [PATCH 16/38] chore: Fix transitive assets support --- src/Directory.Build.targets | 4 ++-- .../SamplesApp.Wasm/SamplesApp.Wasm.csproj | 3 +++ .../Assets/colors300-transitive.png | Bin 0 -> 154268 bytes .../UITests.Shared/UITests.Shared.projitems | 1 + .../Content/uno.ui.tasks.assets.targets | 3 ++- .../Interop/WebAssembly.Runtime.cs | 8 ++++++-- .../Directory.Build.targets | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/SamplesApp/UITests.Shared/Assets/colors300-transitive.png diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 31af62bef031..0047d1f7f1e0 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -75,8 +75,8 @@ - - + + diff --git a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj index 3f2104347fae..ddc980bcc961 100644 --- a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj +++ b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj @@ -26,6 +26,9 @@ false + + true + false - + true + false + true From 465e91ed31009097be57265be1a351c1df2a476e Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 14:44:15 -0400 Subject: [PATCH 20/38] chore: Workaround fluent fonts import issue --- src/SamplesApp/SamplesApp.Wasm/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SamplesApp/SamplesApp.Wasm/Program.cs b/src/SamplesApp/SamplesApp.Wasm/Program.cs index ac1a440d00dd..3e404a467dd8 100644 --- a/src/SamplesApp/SamplesApp.Wasm/Program.cs +++ b/src/SamplesApp/SamplesApp.Wasm/Program.cs @@ -9,6 +9,11 @@ public class Program public static void Main(string[] args) { + // Workaround a net9 nuget bug where : + // + // is not imported properly. Linux only? + Uno.UI.FeatureConfiguration.Font.SymbolsFont = "ms-appx:///Uno.Fonts.Fluent/Fonts/uno-fluentui-assets.ttf"; + // Required to allow for Puppeteer to select XAML elements in the HTML DOM. Uno.UI.FeatureConfiguration.UIElement.AssignDOMXamlName = true; #if !DEBUG From 1e1be1d10235899fcb1a3384f3a4f6a2e264b53c Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 15:52:17 -0400 Subject: [PATCH 21/38] chore: Disable culture validation on wasm net9 --- .../Tests/Windows_UI_Xaml_Controls/Given_DatePicker.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_DatePicker.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_DatePicker.cs index 6413399b4926..f53101e6acfd 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_DatePicker.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_DatePicker.cs @@ -116,6 +116,9 @@ public async Task When_CanadaEnglish_Culture_Column_Order() } [TestMethod] +#if __WASM__ + [Ignore("https://github.com/unoplatform/uno/issues/9080")] // Works locally but not in chromium +#endif public async Task When_CanadaFrench_Culture_Column_Order() { using var _ = new AssertionScope(); @@ -134,6 +137,9 @@ public async Task When_CanadaFrench_Culture_Column_Order() } [TestMethod] +#if __WASM__ + [Ignore("https://github.com/unoplatform/uno/issues/9080")] // Works locally but not in chromium +#endif public async Task When_Czech_Culture_Column_Order() { using var _ = new AssertionScope(); @@ -152,6 +158,9 @@ public async Task When_Czech_Culture_Column_Order() } [TestMethod] +#if __WASM__ + [Ignore("https://github.com/unoplatform/uno/issues/9080")] // Works locally but not in chromium +#endif public async Task When_Hungarian_Culture_Column_Order() { using var _ = new AssertionScope(); From fd61e111e787b71362aaf687da1817f28d7258f5 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 16:42:12 -0400 Subject: [PATCH 22/38] chore: Adjust sdk override for net9 wasm --- src/Uno.Sdk/Sdk/Sdk.props | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Uno.Sdk/Sdk/Sdk.props b/src/Uno.Sdk/Sdk/Sdk.props index dac3cfdb59ff..ec3e718999d0 100644 --- a/src/Uno.Sdk/Sdk/Sdk.props +++ b/src/Uno.Sdk/Sdk/Sdk.props @@ -13,15 +13,17 @@ Copyright (C) Uno Platform Inc. All rights reserved. <_DefaultMicrosoftNETSdk Condition="$(SingleProject) != 'true' AND $(UnoSingleProject) != 'true' AND ($(MSBuildProjectName.EndsWith('.Wasm')) or $(MSBuildProjectName.EndsWith('.WebAssembly')))">Microsoft.NET.Sdk.Web + + + + + <_UnoUseMicrosoftNETSdkWebAssembly Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 9.0">true - <_UnoUseMicrosoftNETSdkWebAssembly Condition=" - $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browserwasm' - AND $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 9.0 - ">true - - <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' == '' ">Microsoft.NET.Sdk.Web + <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' != 'true' ">Microsoft.NET.Sdk.Web <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' == 'true' " >Microsoft.NET.Sdk.WebAssembly + + <_DefaultMicrosoftNETSdk Condition=" $(_DefaultMicrosoftNETSdk) == '' ">Microsoft.NET.Sdk <_DefaultWasmOutputType Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browserwasm'">$(OutputType) From 708d2e2690077c574a7ce3881f82e521bc862a1f Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 19:06:23 -0400 Subject: [PATCH 23/38] chore: adjust supported platform for case sensitivity --- src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index 8ff446d7082e..8a6886de9c40 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -26,6 +26,9 @@ + + + From c2cfa920694305f52a4d10f2dcd77879c2c236f2 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 20:24:53 -0400 Subject: [PATCH 24/38] chore: Adjust case sensitive platform analyzer --- src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index 8a6886de9c40..1fde93e64406 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -16,6 +16,9 @@ $([MSBuild]::ValueOrDefault('$(_InitialOutputType)', 'Library')) true + + + $(NoWarn);CA1418 From 9f51717582a6f65eaa692b6af30b7ae9ff6a5cae Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 17 Sep 2024 22:02:28 -0400 Subject: [PATCH 25/38] chore: Disable StaticWebAssetsEnabled for libraries --- src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index 1fde93e64406..650dd3a7c51b 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -15,6 +15,9 @@ $([MSBuild]::ValueOrDefault('$(_InitialOutputType)', 'Library')) + + false + true From 5437285b1fcd94816bf8b938b8346876ab8a1a1d Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Wed, 18 Sep 2024 07:50:14 -0400 Subject: [PATCH 26/38] chore: Add net9 sample validation --- .../.azure-devops-project-template-tests.yml | 33 +- .../test-scripts/run-net7-template-linux.ps1 | 51 ++- .../run-netcore-mobile-template-tests.ps1 | 418 ++++++++++-------- .../5.3/uno53net9blank/.editorconfig | 167 +++++++ .../5.3/uno53net9blank/.gitignore | 403 +++++++++++++++++ .../5.3/uno53net9blank/.vsconfig | 34 ++ .../5.3/uno53net9blank/Directory.Build.props | 15 + .../uno53net9blank/Directory.Build.targets | 2 + .../uno53net9blank/Directory.Packages.props | 10 + .../5.3/uno53net9blank/global.json | 9 + .../5.3/uno53net9blank/uno53net9blank.sln | 89 ++++ .../uno53net9blank/uno53net9blank/App.xaml | 17 + .../uno53net9blank/uno53net9blank/App.xaml.cs | 130 ++++++ .../uno53net9blank/Assets/Icons/icon.svg | 42 ++ .../Assets/Icons/icon_foreground.svg | 137 ++++++ .../uno53net9blank/Assets/SharedAssets.md | 32 ++ .../Assets/Splash/splash_screen.svg | 137 ++++++ .../uno53net9blank/GlobalUsings.cs | 4 + .../uno53net9blank/MainPage.xaml | 15 + .../uno53net9blank/MainPage.xaml.cs | 9 + .../uno53net9blank/Package.appxmanifest | 31 ++ .../Platforms/Android/AndroidManifest.xml | 4 + .../Platforms/Android/Assets/AboutAssets.txt | 22 + .../Platforms/Android/Main.Android.cs | 48 ++ .../Platforms/Android/MainActivity.Android.cs | 16 + .../Android/Resources/AboutResources.txt | 47 ++ .../Android/Resources/values/Strings.xml | 5 + .../Android/Resources/values/Styles.xml | 22 + .../Platforms/Android/environment.conf | 2 + .../Platforms/Desktop/Program.cs | 22 + .../Platforms/MacCatalyst/Entitlements.plist | 6 + .../Platforms/MacCatalyst/Info.plist | 26 ++ .../Platforms/MacCatalyst/Main.maccatalyst.cs | 16 + .../LaunchImages.launchimage/Contents.json | 58 +++ .../Platforms/WebAssembly/LinkerConfig.xml | 10 + .../Platforms/WebAssembly/Program.cs | 13 + .../Platforms/WebAssembly/WasmCSS/Fonts.css | 28 ++ .../WebAssembly/WasmScripts/AppManifest.js | 3 + .../WebAssembly/manifest.webmanifest | 10 + .../wwwroot/staticwebapp.config.json | 30 ++ .../Platforms/WebAssembly/wwwroot/web.config | 78 ++++ .../Platforms/iOS/Entitlements.plist | 6 + .../uno53net9blank/Platforms/iOS/Info.plist | 43 ++ .../uno53net9blank/Platforms/iOS/Main.iOS.cs | 16 + .../LaunchImages.launchimage/Contents.json | 58 +++ .../Platforms/iOS/PrivacyInfo.xcprivacy | 41 ++ .../PublishProfiles/win-arm64.pubxml | 22 + .../Properties/PublishProfiles/win-x64.pubxml | 22 + .../Properties/PublishProfiles/win-x86.pubxml | 22 + .../Properties/launchSettings.json | 50 +++ .../uno53net9blank/uno53net9blank/ReadMe.md | 7 + .../uno53net9blank/Strings/en/Resources.resw | 123 ++++++ .../uno53net9blank/app.manifest | 25 ++ .../uno53net9blank/uno53net9blank.csproj | 39 ++ 54 files changed, 2505 insertions(+), 220 deletions(-) create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/.editorconfig create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/.gitignore create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/.vsconfig create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.props create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.targets create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/Directory.Packages.props create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/global.json create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank.sln create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon.svg create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon_foreground.svg create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/SharedAssets.md create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Splash/splash_screen.svg create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/GlobalUsings.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Package.appxmanifest create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/AndroidManifest.xml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Assets/AboutAssets.txt create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Main.Android.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/MainActivity.Android.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/AboutResources.txt create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Strings.xml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Styles.xml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/environment.conf create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Desktop/Program.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Entitlements.plist create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Info.plist create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Main.maccatalyst.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/LinkerConfig.xml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/Program.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmCSS/Fonts.css create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmScripts/AppManifest.js create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/manifest.webmanifest create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/staticwebapp.config.json create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/web.config create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Entitlements.plist create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Info.plist create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Main.iOS.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/PrivacyInfo.xcprivacy create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-arm64.pubxml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x64.pubxml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x86.pubxml create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/launchSettings.json create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/ReadMe.md create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Strings/en/Resources.resw create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/app.manifest create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 9d6e2f50aaa7..5ce23e8325bc 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -12,6 +12,15 @@ jobs: pool: ${{ parameters.poolName }} + strategy: + matrix: + group_0: + TestGroup: '0' + group_1: + TestGroup: '1' + group_2: + TestGroup: '2' + steps: - task: DownloadBuildArtifacts@0 inputs: @@ -28,7 +37,7 @@ jobs: displayName: Run Project Templates Tests inputs: targetType: 'filePath' - filePath: build\test-scripts\run-netcore-mobile-template-tests.ps1 + filePath: build\test-scripts\run-netcore-mobile-template-tests.ps1 -TestGroup "$(SITE_SUFFIX)" pwsh: true # Use PowerShell core (required for IsWindows to run) env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) @@ -49,6 +58,15 @@ jobs: pool: vmImage: ${{ parameters.macOSImageName }} + strategy: + matrix: + group_0: + TestGroup: '0' + group_1: + TestGroup: '1' + group_2: + TestGroup: '2' + steps: - task: DownloadBuildArtifacts@0 inputs: @@ -65,7 +83,7 @@ jobs: - powershell: cp $(System.ArtifactsDirectory)/Nuget_Packages/vslatest/*.nupkg $(Build.SourcesDirectory)/src/PackageCache displayName: Copy Artifacts to PackageCache - - powershell: build/test-scripts/run-netcore-mobile-template-tests.ps1 + - powershell: build/test-scripts/run-netcore-mobile-template-tests.ps1 -TestGroup "$(SITE_SUFFIX)" displayName: Run Project Templates Tests env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) @@ -86,6 +104,15 @@ jobs: container: unoplatform/wasm-build:2.3 + strategy: + matrix: + group_0: + TestGroup: '0' + group_1: + TestGroup: '1' + group_2: + TestGroup: '2' + steps: - task: DownloadBuildArtifacts@0 inputs: @@ -102,7 +129,7 @@ jobs: - template: templates/dotnet-install.yml - - pwsh: build/test-scripts/run-net7-template-linux.ps1 + - pwsh: build/test-scripts/run-net7-template-linux.ps1 -TestGroup "$(SITE_SUFFIX)" displayName: Run Project Templates Tests env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index 19f014c87b50..b8ed945e56b0 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -1,4 +1,8 @@ -Set-PSDebug -Trace 1 +param( + $TestGroup +) + +Set-PSDebug -Trace 1 $ErrorActionPreference = 'Stop' @@ -33,45 +37,48 @@ Get-ChildItem -Recurse -Filter global.json | ForEach-Object { $projects = @( # 5.0 and earlier - @("UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj", ""), - @("UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Gtk/UnoAppWinUILinuxValidation.Skia.Gtk.csproj", ""), - @("UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer.csproj", ""), + @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj", ""), + @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Gtk/UnoAppWinUILinuxValidation.Skia.Gtk.csproj", ""), + @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer.csproj", ""), # 5.1 Blank - @("5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", ""), - @("5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", ""), - @("5.1/uno51blank/uno51blank.Skia.WPF/uno51blank.Skia.WPF.csproj", ""), - @("5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", ""), + @(0, "5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", ""), + @(0, "5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", ""), + @(0, "5.1/uno51blank/uno51blank.Skia.WPF/uno51blank.Skia.WPF.csproj", ""), + @(0, "5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", ""), # 5.1 Recommended - @("5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", ""), - @("5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", ""), - @("5.1/uno51recommended/uno51recommended.Skia.WPF/uno51recommended.Skia.WPF.csproj", ""), - @("5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", ""), - @("5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", ""), - @("5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", ""), - @("5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.Skia.WPF/uno51recommended.Skia.WPF.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", ""), + @(0, "5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", ""), # 5.2 Blank - @("5.2/uno52blank/uno52blank/uno52blank.csproj", ""), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", ""), # 5.2 Blank SkiaSharp 3 - @("5.2/uno52blank/uno52blank/uno52blank.csproj", "-p:SkiaSharpVersion=3.0.0-preview.3.1"), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", "-p:SkiaSharpVersion=3.0.0-preview.3.1"), # 5.2 Blank Canvas3DGL - @("5.2/uno52blank/uno52blank/uno52blank.csproj", "-p:UnoFeatures=Canvas3DGL"), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", "-p:UnoFeatures=Canvas3DGL"), # 5.2 Uno Lib - @("5.2/uno52Lib/uno52Lib.csproj", ""), + @(1, "5.2/uno52Lib/uno52Lib.csproj", ""), # 5.2 Uno NuGet Lib - @("5.2/uno52NuGetLib/uno52NuGetLib.csproj", ""), + @(1, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", ""), # 5.2 Uno SingleProject Lib - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", ""), + @(1, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", ""), # 5.2 Uno App with Library reference - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", "") + @(1, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", "") + + # 5.3 Blank with net9 + @(2, "5.2/uno53net9blank/uno53net9blank/uno53net9blank.csproj", ""), ## Note for contributors ## diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index d95e93043519..cc178cf9637b 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -1,4 +1,8 @@ -Set-PSDebug -Trace 1 +param( + $TestGroup +) + +Set-PSDebug -Trace 1 $ErrorActionPreference = 'Stop' @@ -25,170 +29,173 @@ if ($IsWindows) $debug = $default + '/p:Configuration=Debug' + '/r' $release = $default + '/p:Configuration=Release' + '/r' -## Configurations are split to work around UWP not building with .NET new -$dotnetBuildConfigurations = -@( - @("Mobile", "-f:net8.0-android", ""), # workaround for https://github.com/xamarin/xamarin-android/issues/7473 - @("Mobile", "-f:net8.0-ios", ""), - @("Mobile", "-f:net8.0-maccatalyst", ""), - # @("Mobile", "-f:net8.0-macos", ""), # workaround for https://github.com/xamarin/xamarin-macios/issues/16401 - @("Wasm", "", ""), - @("Skia.Gtk", "", ""), - @("Skia.Linux.FrameBuffer", "", "") -) - -if ($IsWindows) +if ($TestGroup -eq 0) { - $dotnetBuildConfigurations += , @("Skia.WPF", "", ""); -} - -cd src/SolutionTemplate + ## Configurations are split to work around UWP not building with .NET new + $dotnetBuildConfigurations = + @( + @("Mobile", "-f:net8.0-android", ""), # workaround for https://github.com/xamarin/xamarin-android/issues/7473 + @("Mobile", "-f:net8.0-ios", ""), + @("Mobile", "-f:net8.0-maccatalyst", ""), + # @("Mobile", "-f:net8.0-macos", ""), # workaround for https://github.com/xamarin/xamarin-macios/issues/16401 + @("Wasm", "", ""), + @("Skia.Gtk", "", ""), + @("Skia.Linux.FrameBuffer", "", "") + ) -# Debug Config -pushd UnoAppAll + if ($IsWindows) + { + $dotnetBuildConfigurations += , @("Skia.WPF", "", ""); + } -for($i = 0; $i -lt $dotnetBuildConfigurations.Length; $i++) -{ - $platform=$dotnetBuildConfigurations[$i][0]; - & dotnet build -c Debug $default $dotnetBuildConfigurations[$i][1] $dotnetBuildConfigurations[$i][2] "UnoAppAll.$platform\UnoAppAll.$platform.csproj" -bl:../binlogs/UnoAppAll.$platform/debug/$i/msbuild.binlog - Assert-ExitCodeIsZero -} + cd src/SolutionTemplate -if ($IsWindows) -{ - & $msbuild $debug "UnoAppAll.UWP\UnoAppAll.UWP.csproj" - Assert-ExitCodeIsZero -} + # Debug Config + pushd UnoAppAll -for($i = 0; $i -lt $dotnetBuildConfigurations.Length; $i++) -{ - $platform=$dotnetBuildConfigurations[$i][0]; - & dotnet build -c Release $default $dotnetBuildConfigurations[$i][1] $dotnetBuildConfigurations[$i][2] "UnoAppAll.$platform\UnoAppAll.$platform.csproj" -bl:../binlogs/UnoAppAll.$platform/release/$i/msbuild.binlog - Assert-ExitCodeIsZero -} + for($i = 0; $i -lt $dotnetBuildConfigurations.Length; $i++) + { + $platform=$dotnetBuildConfigurations[$i][0]; + & dotnet build -c Debug $default $dotnetBuildConfigurations[$i][1] $dotnetBuildConfigurations[$i][2] "UnoAppAll.$platform\UnoAppAll.$platform.csproj" -bl:../binlogs/UnoAppAll.$platform/debug/$i/msbuild.binlog + Assert-ExitCodeIsZero + } -if ($IsWindows) -{ - & $msbuild $debug "UnoAppAll.UWP\UnoAppAll.UWP.csproj" - Assert-ExitCodeIsZero -} + if ($IsWindows) + { + & $msbuild $debug "UnoAppAll.UWP\UnoAppAll.UWP.csproj" + Assert-ExitCodeIsZero + } -CleanupTree + for($i = 0; $i -lt $dotnetBuildConfigurations.Length; $i++) + { + $platform=$dotnetBuildConfigurations[$i][0]; + & dotnet build -c Release $default $dotnetBuildConfigurations[$i][1] $dotnetBuildConfigurations[$i][2] "UnoAppAll.$platform\UnoAppAll.$platform.csproj" -bl:../binlogs/UnoAppAll.$platform/release/$i/msbuild.binlog + Assert-ExitCodeIsZero + } -popd + if ($IsWindows) + { + & $msbuild $debug "UnoAppAll.UWP\UnoAppAll.UWP.csproj" + Assert-ExitCodeIsZero + } -$dotnetBuildNet6Configurations = -@( - @("Mobile", "-f:net8.0-android", ""), - @("Mobile", "-f:net8.0-ios", ""), - @("Mobile", "-f:net8.0-maccatalyst", ""), - # @("Mobile", "-f:net8.0-macos", ""), # workaround for https://github.com/xamarin/xamarin-macios/issues/16401 - @("Wasm", "", ""), - @("Server", "", ""), - @("Skia.Gtk", "", ""), - @("Skia.Linux.FrameBuffer", "", "") -) + CleanupTree -if ($IsWindows) -{ - $dotnetBuildNet6Configurations += , @("Skia.WPF", "", ""); -} + popd -# WinUI - Default -pushd UnoAppWinUI -for($i = 0; $i -lt $dotnetBuildNet6Configurations.Length; $i++) -{ - $platform=$dotnetBuildNet6Configurations[$i][0]; - & dotnet build -c Debug $default $dotnetBuildNet6Configurations[$i][1] $dotnetBuildNet6Configurations[$i][2] "UnoAppWinUI.$platform\UnoAppWinUI.$platform.csproj" -bl:../binlogs/UnoAppWinUI.$platform/debug/$i/msbuild.binlog - Assert-ExitCodeIsZero -} + $dotnetBuildNet6Configurations = + @( + @("Mobile", "-f:net8.0-android", ""), + @("Mobile", "-f:net8.0-ios", ""), + @("Mobile", "-f:net8.0-maccatalyst", ""), + # @("Mobile", "-f:net8.0-macos", ""), # workaround for https://github.com/xamarin/xamarin-macios/issues/16401 + @("Wasm", "", ""), + @("Server", "", ""), + @("Skia.Gtk", "", ""), + @("Skia.Linux.FrameBuffer", "", "") + ) -if ($IsWindows) -{ - # Server project build (merge with above loop when .App folder is removed) - & dotnet build -c Debug $default "UnoAppWinUI.Server\UnoAppWinUI.Server.csproj" + if ($IsWindows) + { + $dotnetBuildNet6Configurations += , @("Skia.WPF", "", ""); + } - # Build with msbuild because of https://github.com/microsoft/WindowsAppSDK/issues/1652 - # force targetframeworks until we can get WinAppSDK to build with `dotnet build` - & $msbuild $debug "/p:Platform=x86" "UnoAppWinUI.Windows\UnoAppWinUI.Windows.csproj" "/p:TargetFrameworks=net8.0-windows10.0.19041;TargetFramework=net8.0-windows10.0.19041" "/bl:../binlogs/UnoAppWinUI.Windows/debug/$i/msbuild.binlog" - Assert-ExitCodeIsZero -} + # WinUI - Default + pushd UnoAppWinUI + for($i = 0; $i -lt $dotnetBuildNet6Configurations.Length; $i++) + { + $platform=$dotnetBuildNet6Configurations[$i][0]; + & dotnet build -c Debug $default $dotnetBuildNet6Configurations[$i][1] $dotnetBuildNet6Configurations[$i][2] "UnoAppWinUI.$platform\UnoAppWinUI.$platform.csproj" -bl:../binlogs/UnoAppWinUI.$platform/debug/$i/msbuild.binlog + Assert-ExitCodeIsZero + } -CleanupTree + if ($IsWindows) + { + # Server project build (merge with above loop when .App folder is removed) + & dotnet build -c Debug $default "UnoAppWinUI.Server\UnoAppWinUI.Server.csproj" -popd + # Build with msbuild because of https://github.com/microsoft/WindowsAppSDK/issues/1652 + # force targetframeworks until we can get WinAppSDK to build with `dotnet build` + & $msbuild $debug "/p:Platform=x86" "UnoAppWinUI.Windows\UnoAppWinUI.Windows.csproj" "/p:TargetFrameworks=net8.0-windows10.0.19041;TargetFramework=net8.0-windows10.0.19041" "/bl:../binlogs/UnoAppWinUI.Windows/debug/$i/msbuild.binlog" + Assert-ExitCodeIsZero + } -# XAML Trimming build smoke test -# See https://github.com/unoplatform/uno/issues/9632 -# dotnet publish -c Debug -r win-x64 -p:PublishTrimmed=true -p:SelfContained=true -p:UnoXamlResourcesTrimming=true MyAppXamlTrim\MyAppXamlTrim.Skia.Gtk\MyAppXamlTrim.Skia.Gtk.csproj -# Assert-ExitCodeIsZero -# -# dotnet run -c Debug --project src\Uno.XamlTrimmingValidator\Uno.XamlTrimmingValidator.csproj -- --hints-file=build\assets\MyAppXamlTrim-hints.txt --target-assembly=MyAppXamlTrim\MyAppXamlTrim.Skia.Gtk\bin\Debug\net6.0\win-x64\publish\Uno.UI.dll -# Assert-ExitCodeIsZero + CleanupTree -if ($IsWindows) -{ - dotnet build MyAppXamlTrim\MyAppXamlTrim.Wasm\MyAppXamlTrim.Wasm.csproj -c Release -p:UnoXamlResourcesTrimming=true -p:WasmShellGenerateCompressedFiles=false -p:WasmShellILLinkerEnabled=true -bl:binlogs/MyAppXamlTrim.Wasm/release/msbuild.binlog - Assert-ExitCodeIsZero - - dotnet run --project ..\Uno.ResourceTrimmingValidator\Uno.ResourceTrimmingValidator.csproj -- -a (Get-ChildItem MyAppXamlTrim.Wasm.clr -Recurse).FullName -r Strings.en.Resources.upri -x Strings.fr.Resources.upri - Assert-ExitCodeIsZero - - dotnet run --project ..\Uno.ResourceTrimmingValidator\Uno.ResourceTrimmingValidator.csproj -- -a (Get-ChildItem Uno.UI.clr -Recurse).FullName -r Resources.Strings.en.Resources.upri -r UI.Xaml.DragDrop.Strings.en-US.Resources.upri -x Resources.Strings.cs-CZ.Resources.upri - Assert-ExitCodeIsZero - - # Uno Library - # Mobile is removed for now, until we can get net7 supported by msbuild/VS 17.4 - $responseFile = @( - "$debug", - "/t:pack", - "MyUnoLib\MyUnoLib.csproj", - "/p:TargetFrameworks=""net8.0-windows10.0.19041;net8.0""" - ) - $responseFile | Out-File -FilePath "build.rsp" -Encoding ASCII + popd - & $msbuild "@build.rsp" - Assert-ExitCodeIsZero + # XAML Trimming build smoke test + # See https://github.com/unoplatform/uno/issues/9632 + # dotnet publish -c Debug -r win-x64 -p:PublishTrimmed=true -p:SelfContained=true -p:UnoXamlResourcesTrimming=true MyAppXamlTrim\MyAppXamlTrim.Skia.Gtk\MyAppXamlTrim.Skia.Gtk.csproj + # Assert-ExitCodeIsZero + # + # dotnet run -c Debug --project src\Uno.XamlTrimmingValidator\Uno.XamlTrimmingValidator.csproj -- --hints-file=build\assets\MyAppXamlTrim-hints.txt --target-assembly=MyAppXamlTrim\MyAppXamlTrim.Skia.Gtk\bin\Debug\net6.0\win-x64\publish\Uno.UI.dll + # Assert-ExitCodeIsZero - if (!$IsWindows) + if ($IsWindows) { - # disabled on windows until android 35 is supported in the installed VS instance + dotnet build MyAppXamlTrim\MyAppXamlTrim.Wasm\MyAppXamlTrim.Wasm.csproj -c Release -p:UnoXamlResourcesTrimming=true -p:WasmShellGenerateCompressedFiles=false -p:WasmShellILLinkerEnabled=true -bl:binlogs/MyAppXamlTrim.Wasm/release/msbuild.binlog + Assert-ExitCodeIsZero - # Uno Cross-Runtime Library - & $msbuild $debug /t:Pack MyCrossRuntimeLib\MyCrossRuntimeLib.sln -bl:binlogs/MyCrossRuntimeLib/msbuild.binlog + dotnet run --project ..\Uno.ResourceTrimmingValidator\Uno.ResourceTrimmingValidator.csproj -- -a (Get-ChildItem MyAppXamlTrim.Wasm.clr -Recurse).FullName -r Strings.en.Resources.upri -x Strings.fr.Resources.upri Assert-ExitCodeIsZero - } - # - # Uno Library with assets, Validate assets count - # - # Mobile is removed for now, until we can get net7 supported by msbuild/VS 17.4 - $responseFile = @( - "$debug", - "/t:pack", - "/p:IncludeContentInPack=false", - "MyUnoLib2\MyUnoLib2.csproj", - "-bl", - "/p:TargetFrameworks=""net8.0-windows10.0.19041;net8.0""" - ) - $responseFile | Out-File -FilePath "build.rsp" -Encoding ASCII + dotnet run --project ..\Uno.ResourceTrimmingValidator\Uno.ResourceTrimmingValidator.csproj -- -a (Get-ChildItem Uno.UI.clr -Recurse).FullName -r Resources.Strings.en.Resources.upri -r UI.Xaml.DragDrop.Strings.en-US.Resources.upri -x Resources.Strings.cs-CZ.Resources.upri + Assert-ExitCodeIsZero + + # Uno Library + # Mobile is removed for now, until we can get net7 supported by msbuild/VS 17.4 + $responseFile = @( + "$debug", + "/t:pack", + "MyUnoLib\MyUnoLib.csproj", + "/p:TargetFrameworks=""net8.0-windows10.0.19041;net8.0""" + ) + $responseFile | Out-File -FilePath "build.rsp" -Encoding ASCII + + & $msbuild "@build.rsp" + Assert-ExitCodeIsZero + + if (!$IsWindows) + { + # disabled on windows until android 35 is supported in the installed VS instance - & $msbuild "@build.rsp" - Assert-ExitCodeIsZero + # Uno Cross-Runtime Library + & $msbuild $debug /t:Pack MyCrossRuntimeLib\MyCrossRuntimeLib.sln -bl:binlogs/MyCrossRuntimeLib/msbuild.binlog + Assert-ExitCodeIsZero + } - mv MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.nupkg MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.zip - Expand-Archive -LiteralPath MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.zip -DestinationPath MyUnoLib2Extract + # + # Uno Library with assets, Validate assets count + # + # Mobile is removed for now, until we can get net7 supported by msbuild/VS 17.4 + $responseFile = @( + "$debug", + "/t:pack", + "/p:IncludeContentInPack=false", + "MyUnoLib2\MyUnoLib2.csproj", + "-bl", + "/p:TargetFrameworks=""net8.0-windows10.0.19041;net8.0""" + ) + $responseFile | Out-File -FilePath "build.rsp" -Encoding ASCII + + & $msbuild "@build.rsp" + Assert-ExitCodeIsZero - $assetsCount = Get-ChildItem MyUnoLib2Extract\ -Filter MyTestAsset01.txt -Recurse -File | Measure-Object | %{$_.Count} + mv MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.nupkg MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.zip + Expand-Archive -LiteralPath MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.zip -DestinationPath MyUnoLib2Extract - #if ($assetsCount -ne 6) # Restore when mobile validation is available - if ($assetsCount -ne 2) - { - throw "Not enough assets in the package." + $assetsCount = Get-ChildItem MyUnoLib2Extract\ -Filter MyTestAsset01.txt -Recurse -File | Measure-Object | %{$_.Count} + + #if ($assetsCount -ne 6) # Restore when mobile validation is available + if ($assetsCount -ne 2) + { + throw "Not enough assets in the package." + } } -} -CleanupTree + CleanupTree +} ## Tests Per versions of uno if ($IsWindows) @@ -222,11 +229,11 @@ $projects = # # 5.1 Blank # - @("5.1/uno51blank/uno51blank.Mobile/uno51blank.Mobile.csproj", "", $true, $true), - @("5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", "", $true, $true), - @("5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", "", $true, $true), - @("5.1/uno51blank/uno51blank.Skia.Wpf/uno51blank.Skia.Wpf.csproj", "", $true, $false), - @("5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", "", $true, $false), + @(1, "5.1/uno51blank/uno51blank.Mobile/uno51blank.Mobile.csproj", "", $true, $true), + @(1, "5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", "", $true, $true), + @(1, "5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", "", $true, $true), + @(1, "5.1/uno51blank/uno51blank.Skia.Wpf/uno51blank.Skia.Wpf.csproj", "", $true, $false), + @(1, "5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", "", $true, $false), # disabled on windows until android 35 is supported in the installed VS instance # @("5.1/uno51blank/uno51blank.Windows/uno51blank.Windows.csproj", "", $false, $false), @@ -234,91 +241,105 @@ $projects = # # 5.1 Recommended # - @("5.1/uno51recommended/uno51recommended.Mobile/uno51recommended.Mobile.csproj", "", $true, $true), + @(1, "5.1/uno51recommended/uno51recommended.Mobile/uno51recommended.Mobile.csproj", "", $true, $true), # disabled on windows until android 35 is supported in the installed VS instance # @("5.1/uno51recommended/uno51recommended.Windows/uno51recommended.Windows.csproj", "", $false, $false), - @("5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", "", $true, $true), - @("5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", "", $true, $true), - @("5.1/uno51recommended/uno51recommended.Skia.Wpf/uno51recommended.Skia.Wpf.csproj", "", $true, $false), - @("5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", "", $true, $false), - @("5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", "", $true, $false), - @("5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", "", $true, $true), - @("5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", "", $true, $true), + @(1, "5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", "", $true, $true), + @(1, "5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", "", $true, $true), + @(1, "5.1/uno51recommended/uno51recommended.Skia.Wpf/uno51recommended.Skia.Wpf.csproj", "", $true, $false), + @(1, "5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", "", $true, $false), + @(1, "5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", "", $true, $false), + @(1, "5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", "", $true, $true), + @(1, "5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", "", $true, $true), # # 5.2 Blank # - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0"), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0", $sdkFeatures), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm"), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm", $sdkFeatures), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios"), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios", $sdkFeatures), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android"), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android", $sdkFeatures), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst", $sdkFeatures), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop"), $true, $true), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop", $sdkFeatures), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0"), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0", $sdkFeatures), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm"), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm", $sdkFeatures), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios"), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios", $sdkFeatures), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android"), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android", $sdkFeatures), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst", $sdkFeatures), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop"), $true, $true), + @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop", $sdkFeatures), $true, $true), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=arm64" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=arm64" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), # Ensure that default without platform builds properly - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), # Validate building inside VS - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true"), $true, $false), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-desktop"), $true, $false), - @("5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-windows10.0.19041"), $false, $false), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true"), $true, $false), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-desktop"), $true, $false), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-windows10.0.19041"), $false, $false), # # 5.2 Uno Lib # - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-ios"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-android"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-ios"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-android"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm", "-p:ImplicitUsings=disable"), $true, $true), - @("5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop", "-p:ImplicitUsings=disable"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm", "-p:ImplicitUsings=disable"), $true, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop", "-p:ImplicitUsings=disable"), $true, $true), # # 5.2 Uno NuGet Lib # - @("5.2/uno52NuGetLib/uno52NuGetLib.csproj", @(), $true, $true), + @(2, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", @(), $true, $true), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @("5.2/uno52Lib/uno52Lib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $true), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $true), # # 5.2 Uno SingleProject Lib # - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0"), $true, $true), - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-browserwasm"), $true, $true), - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-ios"), $true, $true), - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-android"), $true, $true), - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-desktop"), $true, $true), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0"), $true, $true), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-browserwasm"), $true, $true), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-ios"), $true, $true), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-android"), $true, $true), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-desktop"), $true, $true), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @("5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), + @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), # 5.2 Uno App with Library reference - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0"), $true, $true), - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-browserwasm"), $true, $true), - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-ios"), $true, $true), - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-android"), $true, $true), - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-desktop"), $true, $true), + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0"), $true, $true), + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-browserwasm"), $true, $true), + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-ios"), $true, $true), + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-android"), $true, $true), + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true), + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-desktop"), $true, $true), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @("5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false) + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false) + + # 5.3 Uno App with net9 + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0"), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0", $sdkFeatures), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-browserwasm"), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-browserwasm", $sdkFeatures), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-ios"), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-ios", $sdkFeatures), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-android"), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-android", $sdkFeatures), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst"), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst", $sdkFeatures), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop"), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), $true, $true), ## Note for contributors ## @@ -328,10 +349,17 @@ $projects = for($i = 0; $i -lt $projects.Length; $i++) { - $projectPath=$projects[$i][0]; - $projectOptions=$projects[$i][1]; - $buildWithNetCore=$projects[$i][2]; - $runOnMacOS=$projects[$i][3]; + $projectTestGroup=$projects[$i][0]; + $projectPath=$projects[$i][1]; + $projectOptions=$projects[$i][2]; + $buildWithNetCore=$projects[$i][3]; + $runOnMacOS=$projects[$i][4]; + + if ($TestGroup -ne $projectTestGroup) + { + Write-Host "Skipping test $projectPath for group $projectTestGroup" + continue + } if ($IsMacOS -and -not $runOnMacOS) { diff --git a/src/SolutionTemplate/5.3/uno53net9blank/.editorconfig b/src/SolutionTemplate/5.3/uno53net9blank/.editorconfig new file mode 100644 index 000000000000..b947be645f35 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/.editorconfig @@ -0,0 +1,167 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +# This file is the top-most EditorConfig file +root = true + +########################################## +# Common Settings +########################################## + +[*] +indent_style = space +end_of_line = crlf +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +########################################## +# File Extension Settings +########################################## + +[*.{yml,yaml}] +indent_size = 2 + +[.vsconfig] +indent_size = 2 +end_of_line = lf + +[*.sln] +indent_style = tab +indent_size = 2 + +[*.{csproj,proj,projitems,shproj}] +indent_size = 2 + +[*.{json,slnf}] +indent_size = 2 +end_of_line = lf + +[*.{props,targets}] +indent_size = 2 + +[*.xaml] +indent_size = 2 +charset = utf-8-bom + +[*.xml] +indent_size = 2 +end_of_line = lf + +[*.plist] +indent_size = 2 +indent_style = tab +end_of_line = lf + +[*.manifest] +indent_size = 2 + +[*.appxmanifest] +indent_size = 2 + +[*.{json,css,webmanifest}] +indent_size = 2 +end_of_line = lf + +[web.config] +indent_size = 2 +end_of_line = lf + +[*.sh] +indent_size = 2 +end_of_line = lf + +[*.cs] +# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099 +end_of_line = unset + +# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926 +trim_trailing_whitespace = false + +tab_width = 4 +indent_size = 4 + +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true + +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion + +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent diff --git a/src/SolutionTemplate/5.3/uno53net9blank/.gitignore b/src/SolutionTemplate/5.3/uno53net9blank/.gitignore new file mode 100644 index 000000000000..ef88c2053b9a --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/.gitignore @@ -0,0 +1,403 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# Single Target Config +solution-config.props +# Publish Profiles +!**/Properties/PublishProfiles/*.pubxml \ No newline at end of file diff --git a/src/SolutionTemplate/5.3/uno53net9blank/.vsconfig b/src/SolutionTemplate/5.3/uno53net9blank/.vsconfig new file mode 100644 index 000000000000..0439670d0712 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/.vsconfig @@ -0,0 +1,34 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Component.CoreEditor", + "Microsoft.VisualStudio.Workload.CoreEditor", + "Microsoft.NetCore.Component.SDK", + "Microsoft.NetCore.Component.DevelopmentTools", + "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", + "Microsoft.VisualStudio.Component.TextTemplating", + "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", + "Microsoft.NetCore.Component.Web", + "Microsoft.VisualStudio.Component.IISExpress", + "Component.Microsoft.Web.LibraryManager", + "Microsoft.VisualStudio.ComponentGroup.Web", + "Microsoft.VisualStudio.Component.Web", + "Microsoft.VisualStudio.ComponentGroup.Web.Client", + "Microsoft.VisualStudio.Workload.NetWeb", + "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine", + "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", + "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", + "Microsoft.VisualStudio.Component.Debugger.JustInTime", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Component.Xamarin.RemotedSimulator", + "Microsoft.VisualStudio.Component.MonoDebugger", + "Microsoft.VisualStudio.ComponentGroup.Maui.All", + "Component.Android.SDK34", + "Component.OpenJDK", + "Microsoft.VisualStudio.Workload.NetCrossPlat", + "Microsoft.VisualStudio.Workload.NetCoreTools" + ], + "extensions": [ + "https://marketplace.visualstudio.com/items?itemName=unoplatform.uno-platform-addin-2022" + ] +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.props b/src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.props new file mode 100644 index 000000000000..8daf56929cc3 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.props @@ -0,0 +1,15 @@ + + + enable + enable + true + + + $(NoWarn);NU1507;NETSDK1201;PRI257 + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.targets b/src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.targets new file mode 100644 index 000000000000..f75adf7e4d62 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/Directory.Packages.props b/src/SolutionTemplate/5.3/uno53net9blank/Directory.Packages.props new file mode 100644 index 000000000000..2db579c5725e --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/Directory.Packages.props @@ -0,0 +1,10 @@ + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/global.json b/src/SolutionTemplate/5.3/uno53net9blank/global.json new file mode 100644 index 000000000000..afb48bfccaea --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/global.json @@ -0,0 +1,9 @@ +{ + // 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": "5.3.108" + }, + "sdk":{ + "allowPrerelease": true + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank.sln b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank.sln new file mode 100644 index 000000000000..47ae207fd672 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank.sln @@ -0,0 +1,89 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32210.308 +MinimumVisualStudioVersion = 15.0.26124.0 + +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uno53net9blank", "uno53net9blank\uno53net9blank.csproj", "{45E4BD41-6330-4024-8C1C-D8C7B051B7A9}" +EndProject + +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .gitignore = .gitignore + .vsconfig = .vsconfig + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets + Directory.Packages.props = Directory.Packages.props + global.json = global.json + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|iPhone = Debug|iPhone + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|iPhone = Release|iPhone + Release|iPhoneSimulator = Release|iPhoneSimulator + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|ARM.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|ARM.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|ARM.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|ARM64.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|ARM64.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|iPhone.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|iPhone.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|x64.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|x64.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|x64.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|x86.ActiveCfg = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|x86.Build.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Debug|x86.Deploy.0 = Debug|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|Any CPU.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|Any CPU.Deploy.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|ARM.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|ARM.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|ARM.Deploy.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|ARM64.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|ARM64.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|ARM64.Deploy.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|iPhone.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|iPhone.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|iPhone.Deploy.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|x64.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|x64.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|x64.Deploy.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|x86.ActiveCfg = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|x86.Build.0 = Release|Any CPU + {45E4BD41-6330-4024-8C1C-D8C7B051B7A9}.Release|x86.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DF77E4D9-FEAF-48BE-8D28-916C391510D0} + EndGlobalSection +EndGlobal diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml new file mode 100644 index 000000000000..02729d637546 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml.cs new file mode 100644 index 000000000000..622781bbb6d5 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/App.xaml.cs @@ -0,0 +1,130 @@ +using System; +using Microsoft.Extensions.Logging; +using Uno.Resizetizer; + +namespace uno53net9blank; + +public partial class App : Application +{ + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected Window? MainWindow { get; private set; } + + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + MainWindow = new Window(); +#if DEBUG + MainWindow.EnableHotReload(); +#endif + + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (MainWindow.Content is not Frame rootFrame) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + // Place the frame in the current Window + MainWindow.Content = rootFrame; + + rootFrame.NavigationFailed += OnNavigationFailed; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(typeof(MainPage), args.Arguments); + } + + MainWindow.SetWindowIcon(); + // Ensure the current window is active + MainWindow.Activate(); + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new InvalidOperationException($"Failed to load {e.SourcePageType.FullName}: {e.Exception}"); + } + + /// + /// Configures global Uno Platform logging + /// + public static void InitializeLogging() + { +#if DEBUG + // Logging is disabled by default for release builds, as it incurs a significant + // initialization cost from Microsoft.Extensions.Logging setup. If startup performance + // is a concern for your application, keep this disabled. If you're running on the web or + // desktop targets, you can use URL or command line parameters to enable it. + // + // For more performance documentation: https://platform.uno/docs/articles/Uno-UI-Performance.html + + var factory = LoggerFactory.Create(builder => + { +#if __WASM__ + builder.AddProvider(new global::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider()); +#elif __IOS__ || __MACCATALYST__ + builder.AddProvider(new global::Uno.Extensions.Logging.OSLogLoggerProvider()); +#else + builder.AddConsole(); +#endif + + // Exclude logs below this level + builder.SetMinimumLevel(LogLevel.Information); + + // Default filters for Uno Platform namespaces + builder.AddFilter("Uno", LogLevel.Warning); + builder.AddFilter("Windows", LogLevel.Warning); + builder.AddFilter("Microsoft", LogLevel.Warning); + + // Generic Xaml events + // builder.AddFilter("Microsoft.UI.Xaml", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.VisualStateGroup", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.StateTriggerBase", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.UIElement", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.FrameworkElement", LogLevel.Trace ); + + // Layouter specific messages + // builder.AddFilter("Microsoft.UI.Xaml.Controls", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.Controls.Layouter", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.Controls.Panel", LogLevel.Debug ); + + // builder.AddFilter("Windows.Storage", LogLevel.Debug ); + + // Binding related messages + // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug ); + + // Binder memory references tracking + // builder.AddFilter("Uno.UI.DataBinding.BinderReferenceHolder", LogLevel.Debug ); + + // DevServer and HotReload related + // builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Information); + + // Debug JS interop + // builder.AddFilter("Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug ); + }); + + global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory = factory; + +#if HAS_UNO + global::Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.Initialize(); +#endif +#endif + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon.svg b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon.svg new file mode 100644 index 000000000000..a15af53aab30 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon.svg @@ -0,0 +1,42 @@ + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon_foreground.svg b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon_foreground.svg new file mode 100644 index 000000000000..8ffc41ae3a5d --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Icons/icon_foreground.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/SharedAssets.md b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/SharedAssets.md new file mode 100644 index 000000000000..1b84a74ab8a3 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/SharedAssets.md @@ -0,0 +1,32 @@ +# Shared Assets + +See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md + +## Here is a cheat sheet + +1. Add the image file to the `Assets` directory of a shared project. +2. Set the build action to `Content`. +3. (Recommended) Provide an asset for various scales/dpi + +### Examples + +```text +\Assets\Images\logo.scale-100.png +\Assets\Images\logo.scale-200.png +\Assets\Images\logo.scale-400.png + +\Assets\Images\scale-100\logo.png +\Assets\Images\scale-200\logo.png +\Assets\Images\scale-400\logo.png +``` + +### Table of scales + +| Scale | WinUI | iOS/MacCatalyst | Android | +|-------|:-----------:|:---------------:|:-------:| +| `100` | scale-100 | @1x | mdpi | +| `125` | scale-125 | N/A | N/A | +| `150` | scale-150 | N/A | hdpi | +| `200` | scale-200 | @2x | xhdpi | +| `300` | scale-300 | @3x | xxhdpi | +| `400` | scale-400 | N/A | xxxhdpi | diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Splash/splash_screen.svg b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Splash/splash_screen.svg new file mode 100644 index 000000000000..8ffc41ae3a5d --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Assets/Splash/splash_screen.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/GlobalUsings.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/GlobalUsings.cs new file mode 100644 index 000000000000..eeafbe36fe38 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/GlobalUsings.cs @@ -0,0 +1,4 @@ +global using System.Collections.Immutable; +global using Microsoft.Extensions.DependencyInjection; +global using Microsoft.Extensions.Logging; +global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState; diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml new file mode 100644 index 000000000000..f27465114dcf --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml.cs new file mode 100644 index 000000000000..08b56f752a59 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/MainPage.xaml.cs @@ -0,0 +1,9 @@ +namespace uno53net9blank; + +public sealed partial class MainPage : Page +{ + public MainPage() + { + this.InitializeComponent(); + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Package.appxmanifest b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Package.appxmanifest new file mode 100644 index 000000000000..9ef3814675ec --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Package.appxmanifest @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/AndroidManifest.xml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/AndroidManifest.xml new file mode 100644 index 000000000000..95ae07533a05 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Assets/AboutAssets.txt b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Assets/AboutAssets.txt new file mode 100644 index 000000000000..89ab409df769 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Assets/AboutAssets.txt @@ -0,0 +1,22 @@ +To add cross-platform image assets for your Uno Platform app, use the Assets folder +in the shared project instead. Assets in this folder are Android-only assets. + +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with your package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Main.Android.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Main.Android.cs new file mode 100644 index 000000000000..39339b71ad7c --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Main.Android.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Android.App; +using Android.Content; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Com.Nostra13.Universalimageloader.Core; +using Microsoft.UI.Xaml.Media; + +namespace uno53net9blank.Droid; + +[global::Android.App.ApplicationAttribute( + Label = "@string/ApplicationName", + Icon = "@mipmap/icon", + LargeHeap = true, + HardwareAccelerated = true, + Theme = "@style/AppTheme" +)] +public class Application : Microsoft.UI.Xaml.NativeApplication +{ + static Application() + { + App.InitializeLogging(); + } + + public Application(IntPtr javaReference, JniHandleOwnership transfer) + : base(() => new App(), javaReference, transfer) + { + ConfigureUniversalImageLoader(); + } + + private static void ConfigureUniversalImageLoader() + { + // Create global configuration and initialize ImageLoader with this config + ImageLoaderConfiguration config = new ImageLoaderConfiguration + .Builder(Context) + .Build(); + + ImageLoader.Instance.Init(config); + + ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync; + } +} + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/MainActivity.Android.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/MainActivity.Android.cs new file mode 100644 index 000000000000..ecd3985cc45d --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/MainActivity.Android.cs @@ -0,0 +1,16 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; +using Android.Views; +using Android.Widget; + +namespace uno53net9blank.Droid; + +[Activity( + MainLauncher = true, + ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges, + WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden +)] +public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity +{ +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/AboutResources.txt b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/AboutResources.txt new file mode 100644 index 000000000000..17e3b1333511 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/AboutResources.txt @@ -0,0 +1,47 @@ +To add cross-platform image assets for your Uno Platform app, use the Assets folder +in the shared project instead. Resources in this folder are Android-only. + +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.axml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the "Resources" directory of the application: + +Resources/ + drawable/ + icon.png + + layout/ + main.axml + + values/ + strings.xml + +In order to get the build system to recognize Android resources, set the build action to +"AndroidResource". The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + public class drawable { + public const int icon = 0x123; + } + + public class layout { + public const int main = 0x456; + } + + public class strings { + public const int first_string = 0xabc; + public const int second_string = 0xbcd; + } +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main +to reference the layout/main.axml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Strings.xml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Strings.xml new file mode 100644 index 000000000000..c2e08e8e9843 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Strings.xml @@ -0,0 +1,5 @@ + + + Hello World, Click Me! + uno53net9blank + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Styles.xml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Styles.xml new file mode 100644 index 000000000000..c02bd06f7194 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/Resources/values/Styles.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/environment.conf b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/environment.conf new file mode 100644 index 000000000000..fa6c2e32bfb6 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Android/environment.conf @@ -0,0 +1,2 @@ +# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/ +MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=32m,soft-heap-limit=256m \ No newline at end of file diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Desktop/Program.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Desktop/Program.cs new file mode 100644 index 000000000000..e5b642d6bcb6 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/Desktop/Program.cs @@ -0,0 +1,22 @@ +using Uno.UI.Runtime.Skia; + +namespace uno53net9blank; + +public class Program +{ + [STAThread] + public static void Main(string[] args) + { + App.InitializeLogging(); + + var host = SkiaHostBuilder.Create() + .App(() => new App()) + .UseX11() + .UseLinuxFrameBuffer() + .UseMacOS() + .UseWindows() + .Build(); + + host.Run(); + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Entitlements.plist b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 000000000000..24c3103683fa --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Info.plist b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Info.plist new file mode 100644 index 000000000000..1bb02ddcdc3e --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,26 @@ + + + + + UIDeviceFamily + + 2 + + LSApplicationCategoryType + public.app-category.utilities + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/icon.appiconset + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Main.maccatalyst.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Main.maccatalyst.cs new file mode 100644 index 000000000000..c82a2d911a35 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Main.maccatalyst.cs @@ -0,0 +1,16 @@ +using UIKit; + +namespace uno53net9blank.MacCatalyst; + +public class EntryPoint +{ + // This is the main entry point of the application. + public static void Main(string[] args) + { + App.InitializeLogging(); + + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(App)); + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 000000000000..69555e44061e --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -0,0 +1,58 @@ +{ + "images": [ + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "640x960", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "subtype": "retina4", + "scale": "2x", + "size": "640x1136", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "768x1024", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "1024x768", + "idiom": "ipad" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "1536x2048", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "2048x1536", + "idiom": "ipad" + } + ], + "properties": {}, + "info": { + "version": 1, + "author": "" + } +} \ No newline at end of file diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/LinkerConfig.xml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/LinkerConfig.xml new file mode 100644 index 000000000000..4eb3b1e0bc08 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/LinkerConfig.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/Program.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/Program.cs new file mode 100644 index 000000000000..1c01993cf702 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/Program.cs @@ -0,0 +1,13 @@ +namespace uno53net9blank; + +public class Program +{ + private static App? _app; + + public static int Main(string[] args) + { + Microsoft.UI.Xaml.Application.Start(_ => _app = new App()); + + return 0; + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmCSS/Fonts.css b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmCSS/Fonts.css new file mode 100644 index 000000000000..4fdd60555f79 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmCSS/Fonts.css @@ -0,0 +1,28 @@ +/** + When adding fonts here, make sure to add them using a base64 data uri, otherwise + fonts loading are delayed, and text may get displayed incorrectly. +*/ + +/* https://github.com/unoplatform/uno/issues/3954 */ +@font-face { + font-family: 'Segoe UI'; + src: local('Segoe UI'), local('-apple-system'), local('BlinkMacSystemFont'), local('Inter'), local('Cantarell'), local('Ubuntu'), local('Roboto'), local('Open Sans'), local('Noto Sans'), local('Helvetica Neue'), local('sans-serif'); +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf) format('truetype'); + font-weight: 300; +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf) format('truetype'); + font-weight: 400; +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf) format('truetype'); + font-weight: 500; +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmScripts/AppManifest.js b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmScripts/AppManifest.js new file mode 100644 index 000000000000..e1d8f9047651 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/WasmScripts/AppManifest.js @@ -0,0 +1,3 @@ +var UnoAppManifest = { + displayName: "uno53net9blank" +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/manifest.webmanifest b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/manifest.webmanifest new file mode 100644 index 000000000000..a3db4e5f82c2 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/manifest.webmanifest @@ -0,0 +1,10 @@ +{ + "background_color": "#ffffff", + "description": "uno53net9blank", + "display": "standalone", + "name": "uno53net9blank", + "short_name": "uno53net9blank", + "start_url": "/index.html", + "theme_color": "#ffffff", + "scope": "/" +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/staticwebapp.config.json b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/staticwebapp.config.json new file mode 100644 index 000000000000..79c1b17c4b51 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/staticwebapp.config.json @@ -0,0 +1,30 @@ +{ + "navigationFallback": { + "rewrite": "/index.html", + "exclude": [ + "*.{css,js}", + "*.{png}", + "*.{c,h,wasm,clr,pdb,dat,txt}" + ] + }, + "routes": [ + { + "route": "/package_*", + "headers": { + "cache-control": "public, immutable, max-age=31536000" + } + }, + { + "route": "/*.ttf", + "headers": { + "cache-control": "public, immutable, max-age=31536000" + } + }, + { + "route": "/*", + "headers": { + "cache-control": "must-revalidate, max-age=3600" + } + } + ] +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/web.config b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/web.config new file mode 100644 index 000000000000..8f5a860f5fd7 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/WebAssembly/wwwroot/web.config @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Entitlements.plist b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Entitlements.plist new file mode 100644 index 000000000000..24c3103683fa --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Info.plist b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Info.plist new file mode 100644 index 000000000000..ea3dcb4bc03a --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Info.plist @@ -0,0 +1,43 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + XSAppIconAssets + Assets.xcassets/icon.appiconset + UIApplicationSupportsIndirectInputEvents + + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Main.iOS.cs b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Main.iOS.cs new file mode 100644 index 000000000000..6ad32bf00442 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Main.iOS.cs @@ -0,0 +1,16 @@ +using UIKit; + +namespace uno53net9blank.iOS; + +public class EntryPoint +{ + // This is the main entry point of the application. + public static void Main(string[] args) + { + App.InitializeLogging(); + + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(App)); + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 000000000000..69555e44061e --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -0,0 +1,58 @@ +{ + "images": [ + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "640x960", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "subtype": "retina4", + "scale": "2x", + "size": "640x1136", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "768x1024", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "1024x768", + "idiom": "ipad" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "1536x2048", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "2048x1536", + "idiom": "ipad" + } + ], + "properties": {}, + "info": { + "version": 1, + "author": "" + } +} \ No newline at end of file diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/PrivacyInfo.xcprivacy b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/PrivacyInfo.xcprivacy new file mode 100644 index 000000000000..902abb059433 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Platforms/iOS/PrivacyInfo.xcprivacy @@ -0,0 +1,41 @@ + + + + + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-arm64.pubxml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-arm64.pubxml new file mode 100644 index 000000000000..d5147f1039d7 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-arm64.pubxml @@ -0,0 +1,22 @@ + + + + + FileSystem + arm64 + win-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x64.pubxml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 000000000000..4fea954ee1f6 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,22 @@ + + + + + FileSystem + x64 + win-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x86.pubxml b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x86.pubxml new file mode 100644 index 000000000000..928cb25ebd83 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/PublishProfiles/win-x86.pubxml @@ -0,0 +1,22 @@ + + + + + FileSystem + x86 + win-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/launchSettings.json b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/launchSettings.json new file mode 100644 index 000000000000..a5903b4aafcb --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Properties/launchSettings.json @@ -0,0 +1,50 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:8080", + "sslPort": 0 + } + }, + "profiles": { + // This profile is first in order for dotnet run to pick it up by default + "uno53net9blank (WebAssembly)": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5000", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "uno53net9blank (WebAssembly IIS Express)": { + "commandName": "IISExpress", + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + // Note: In order to select this profile, you'll need to comment the `Packaged` profile below until this is fixed: https://aka.platform.uno/wasdk-maui-debug-profile-issue + "uno53net9blank (WinAppSDK Unpackaged)": { + "commandName": "Project", + "compatibleTargetFramework": "windows" + }, + "uno53net9blank (WinAppSDK Packaged)": { + "commandName": "MsixPackage", + "compatibleTargetFramework": "windows" + }, + "uno53net9blank (Desktop)": { + "commandName": "Project", + "compatibleTargetFramework": "desktop" + }, + "uno53net9blank (Desktop WSL2)": { + "commandName": "WSL2", + "commandLineArgs": "{ProjectDir}/bin/Debug/net9.0-desktop/uno53net9blank.dll", + "distributionName": "", + "compatibleTargetFramework": "desktop" + } + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/ReadMe.md b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/ReadMe.md new file mode 100644 index 000000000000..93482da23932 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/ReadMe.md @@ -0,0 +1,7 @@ +# Getting Started + +Welcome to the Uno Platform! + +To discover how to get started with your new app: https://aka.platform.uno/get-started + +For more information on how to use the Uno.Sdk or upgrade Uno Platform packages in your solution: https://aka.platform.uno/using-uno-sdk \ No newline at end of file diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Strings/en/Resources.resw b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Strings/en/Resources.resw new file mode 100644 index 000000000000..0ff6e59d9abd --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/Strings/en/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + uno53net9blank-en + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/app.manifest b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/app.manifest new file mode 100644 index 000000000000..6f24c8800ca4 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/app.manifest @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj new file mode 100644 index 000000000000..072c29f86f5b --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj @@ -0,0 +1,39 @@ + + + net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041;net9.0-browserwasm;net9.0-desktop + + Exe + true + + + uno53net9blank + + com.companyname.uno53net9blank + + 1.0 + 1 + + uno53net9blank + + uno53net9blank powered by Uno Platform. + + + + + + + + + From 9994085ef19c60252812009589c253b1aa9b6797 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Wed, 18 Sep 2024 09:41:53 -0400 Subject: [PATCH 27/38] chore: Adjust template tests run --- build/ci/.azure-devops-project-template-tests.yml | 6 +++--- build/test-scripts/run-net7-template-linux.ps1 | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 5ce23e8325bc..26649b59368f 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -37,7 +37,7 @@ jobs: displayName: Run Project Templates Tests inputs: targetType: 'filePath' - filePath: build\test-scripts\run-netcore-mobile-template-tests.ps1 -TestGroup "$(SITE_SUFFIX)" + filePath: build\test-scripts\run-netcore-mobile-template-tests.ps1 -TestGroup "$(TestGroup)" pwsh: true # Use PowerShell core (required for IsWindows to run) env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) @@ -83,7 +83,7 @@ jobs: - powershell: cp $(System.ArtifactsDirectory)/Nuget_Packages/vslatest/*.nupkg $(Build.SourcesDirectory)/src/PackageCache displayName: Copy Artifacts to PackageCache - - powershell: build/test-scripts/run-netcore-mobile-template-tests.ps1 -TestGroup "$(SITE_SUFFIX)" + - powershell: build/test-scripts/run-netcore-mobile-template-tests.ps1 -TestGroup "$(TestGroup)" displayName: Run Project Templates Tests env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) @@ -129,7 +129,7 @@ jobs: - template: templates/dotnet-install.yml - - pwsh: build/test-scripts/run-net7-template-linux.ps1 -TestGroup "$(SITE_SUFFIX)" + - pwsh: build/test-scripts/run-net7-template-linux.ps1 -TestGroup "$(TestGroup)" displayName: Run Project Templates Tests env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index b8ed945e56b0..ff3c5e585671 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -88,8 +88,15 @@ $projects = for($i = 0; $i -lt $projects.Length; $i++) { - $projectPath=$projects[$i][0]; - $projectOptions=$projects[$i][1]; + $projectTestGroup=$projects[$i][0]; + $projectPath=$projects[$i][1]; + $projectOptions=$projects[$i][2]; + + if ($TestGroup -ne $projectTestGroup) + { + Write-Host "Skipping test $projectPath for group $projectTestGroup" + continue + } Write-Host "Building Debug $projectPath with $projectOptions" dotnet build $debug "$projectPath" $projectOptions -bl:binlogs/$projectPath/debug.binlog From 6ab227a8e374610072cf9d7d6d4040c368a0fcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 18 Sep 2024 11:36:58 -0400 Subject: [PATCH 28/38] chore: Adjust line endings --- build/test-scripts/run-net7-template-linux.ps1 | 4 ++-- build/test-scripts/run-netcore-mobile-template-tests.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index ff3c5e585671..6d481db4aa86 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -75,10 +75,10 @@ $projects = @(1, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", ""), # 5.2 Uno App with Library reference - @(1, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", "") + @(1, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", ""), # 5.3 Blank with net9 - @(2, "5.2/uno53net9blank/uno53net9blank/uno53net9blank.csproj", ""), + @(2, "5.2/uno53net9blank/uno53net9blank/uno53net9blank.csproj", "") ## Note for contributors ## diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index cc178cf9637b..27c5477da9c7 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -325,7 +325,7 @@ $projects = @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-desktop"), $true, $true), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false) + @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false), # 5.3 Uno App with net9 @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0"), $true, $true), @@ -339,7 +339,7 @@ $projects = @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst"), $true, $true), @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst", $sdkFeatures), $true, $true), @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop"), $true, $true), - @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), $true, $true), + @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), $true, $true) ## Note for contributors ## From 2493958ffdbef186442a367c758e32566c4d5885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 18 Sep 2024 13:46:55 -0400 Subject: [PATCH 29/38] chore: Adjust test groups --- build/ci/.azure-devops-project-template-tests.yml | 3 ++- src/SolutionTemplate/5.3/uno53net9blank/global.json | 2 +- .../5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 26649b59368f..5cca9b14be65 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -37,7 +37,8 @@ jobs: displayName: Run Project Templates Tests inputs: targetType: 'filePath' - filePath: build\test-scripts\run-netcore-mobile-template-tests.ps1 -TestGroup "$(TestGroup)" + script: | + build\test-scripts\run-netcore-mobile-template-tests.ps1 -TestGroup "$(TestGroup)" pwsh: true # Use PowerShell core (required for IsWindows to run) env: BUILD_SOURCESDIRECTORY: $(BUILD.SOURCESDIRECTORY) diff --git a/src/SolutionTemplate/5.3/uno53net9blank/global.json b/src/SolutionTemplate/5.3/uno53net9blank/global.json index afb48bfccaea..39ff1e0492de 100644 --- a/src/SolutionTemplate/5.3/uno53net9blank/global.json +++ b/src/SolutionTemplate/5.3/uno53net9blank/global.json @@ -1,7 +1,7 @@ { // 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": "5.3.108" + "Uno.Sdk.Private": "5.3.108" }, "sdk":{ "allowPrerelease": true diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj index 072c29f86f5b..2bc12ddb9143 100644 --- a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj @@ -1,4 +1,4 @@ - + net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041;net9.0-browserwasm;net9.0-desktop From ac00dc705f3f43b489ffbae6be28045c4193a825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 18 Sep 2024 15:56:02 -0400 Subject: [PATCH 30/38] chore: Adjust startup path --- build/test-scripts/run-net7-template-linux.ps1 | 2 +- build/test-scripts/run-netcore-mobile-template-tests.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index 6d481db4aa86..5d03aca580e2 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -78,7 +78,7 @@ $projects = @(1, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", ""), # 5.3 Blank with net9 - @(2, "5.2/uno53net9blank/uno53net9blank/uno53net9blank.csproj", "") + @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", "") ## Note for contributors ## diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index 27c5477da9c7..858cf4ef3039 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -29,6 +29,8 @@ if ($IsWindows) $debug = $default + '/p:Configuration=Debug' + '/r' $release = $default + '/p:Configuration=Release' + '/r' +cd src/SolutionTemplate + if ($TestGroup -eq 0) { ## Configurations are split to work around UWP not building with .NET new @@ -48,8 +50,6 @@ if ($TestGroup -eq 0) $dotnetBuildConfigurations += , @("Skia.WPF", "", ""); } - cd src/SolutionTemplate - # Debug Config pushd UnoAppAll From b62bc8c68b3f7193dcc727c6a61f9e18d931bf04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 18 Sep 2024 20:20:54 -0400 Subject: [PATCH 31/38] chore: Update to latest bootstrapper, adjust windows build --- build/ci/.azure-devops-project-template-tests.yml | 2 +- src/Uno.Sdk/packages.json | 2 +- 2 files 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 5cca9b14be65..6fdec27b8fb5 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -36,7 +36,7 @@ jobs: - task: PowerShell@2 displayName: Run Project Templates Tests inputs: - targetType: 'filePath' + targetType: 'inline' script: | build\test-scripts\run-netcore-mobile-template-tests.ps1 -TestGroup "$(TestGroup)" pwsh: true # Use PowerShell core (required for IsWindows to run) diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index 997db7c58cd4..088c5bec2dce 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -32,7 +32,7 @@ "Uno.Wasm.Bootstrap.Server" ], "versionOverride": { - "net9.0": "9.0.0-dev.104" + "net9.0": "9.0.0-dev.286" } }, { From 9e3db72e01c218cd8ee89f6131da3c20eebcf767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 18 Sep 2024 22:09:39 -0400 Subject: [PATCH 32/38] chore: Adjust net9 test, groups count --- build/ci/.azure-devops-project-template-tests.yml | 4 ++++ .../uno53net9blank/uno53net9blank/uno53net9blank.csproj | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 6fdec27b8fb5..23fa44a905e2 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -20,6 +20,8 @@ jobs: TestGroup: '1' group_2: TestGroup: '2' + group_2: + TestGroup: '3' steps: - task: DownloadBuildArtifacts@0 @@ -67,6 +69,8 @@ jobs: TestGroup: '1' group_2: TestGroup: '2' + group_3: + TestGroup: '3' steps: - task: DownloadBuildArtifacts@0 diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj index 2bc12ddb9143..44e18aefab39 100644 --- a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj @@ -1,6 +1,13 @@ - net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041;net9.0-browserwasm;net9.0-desktop + net9.0-browserwasm;net9.0-desktop;net9.0 + $(TargetFrameworks);net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-desktop + $(TargetFrameworks);net9.0-windows10.0.19041 + + + $(TargetFrameworks.Replace('net9.0-android','')) + $(TargetFrameworks.Replace('net9.0-ios','')) + $(TargetFrameworks.Replace('net9.0-maccatalyst','')) Exe true From dae21b36eb643c20e94a1e1513516d6745087ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 18 Sep 2024 22:12:51 -0400 Subject: [PATCH 33/38] chore: Adjust group --- build/ci/.azure-devops-project-template-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 23fa44a905e2..a2b8432496e9 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -20,7 +20,7 @@ jobs: TestGroup: '1' group_2: TestGroup: '2' - group_2: + group_3: TestGroup: '3' steps: From adf64fa0a821b61c9c08e667929dd53f7a67d78d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Thu, 19 Sep 2024 21:43:14 -0400 Subject: [PATCH 34/38] chore: Adjust wasm sdk setup for net9 --- .../5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj | 4 ++++ .../Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets | 2 +- src/Uno.Sdk/Sdk/Sdk.props | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj index 44e18aefab39..d60cb23513d3 100644 --- a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj @@ -43,4 +43,8 @@ + + + + diff --git a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets index b666ea2d7677..70ec7b5fff90 100644 --- a/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets +++ b/src/SourceGenerators/Uno.UI.Tasks/Content/uno.ui.tasks.assets.targets @@ -252,7 +252,7 @@ DependsOnTargets="_UnoGetCopyToOutputItems" Condition=" '$(UsingMicrosoftNETSdkWebAssembly)' == 'true' "> - + <_UnoTransitiveItems Include="@(UnoAllCopyToOutputItems)"> $([System.IO.Path]::GetDirectoryName('%(FullPath)')) diff --git a/src/Uno.Sdk/Sdk/Sdk.props b/src/Uno.Sdk/Sdk/Sdk.props index ec3e718999d0..6c6fa446ab2b 100644 --- a/src/Uno.Sdk/Sdk/Sdk.props +++ b/src/Uno.Sdk/Sdk/Sdk.props @@ -17,7 +17,7 @@ Copyright (C) Uno Platform Inc. All rights reserved. - <_UnoUseMicrosoftNETSdkWebAssembly Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 9.0">true + <_UnoUseMicrosoftNETSdkWebAssembly Condition=" $([MSBuild]::VersionGreaterThanOrEquals( $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')), '9.0')) ">true <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' != 'true' ">Microsoft.NET.Sdk.Web <_DefaultMicrosoftNETSdk Condition=" '$(_UnoUseMicrosoftNETSdkWebAssembly)' == 'true' " >Microsoft.NET.Sdk.WebAssembly From b922e91498e71f657d6b78c2ad72c1f66fc9418c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Thu, 19 Sep 2024 23:30:57 -0400 Subject: [PATCH 35/38] chore: Adjust net wasm validation, adjust Microsoft.AspNetCore.App removal condition --- .../5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj | 2 +- src/Uno.Sdk/Sdk/Sdk.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj index d60cb23513d3..6c717515eb9f 100644 --- a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj @@ -43,7 +43,7 @@ - + diff --git a/src/Uno.Sdk/Sdk/Sdk.props b/src/Uno.Sdk/Sdk/Sdk.props index 6c6fa446ab2b..1f2b3921d24f 100644 --- a/src/Uno.Sdk/Sdk/Sdk.props +++ b/src/Uno.Sdk/Sdk/Sdk.props @@ -82,7 +82,7 @@ Copyright (C) Uno Platform Inc. All rights reserved. VS to read the global properties and avoid showing a yellow icon being the result of a mismatch between runs of design-time builds (one build defining a FrameworkReference and another one not). --> - + From fd322bc92271aadd6414f1e69b888670db5dd4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 20 Sep 2024 07:57:49 -0400 Subject: [PATCH 36/38] chore: Update to latest bootstrapper --- src/Directory.Build.targets | 4 ++-- src/Uno.Sdk/packages.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 8513cd30a91e..f1dab0ef1723 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -75,8 +75,8 @@ - - + + diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index 088c5bec2dce..d8b20b7b3e69 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -32,7 +32,7 @@ "Uno.Wasm.Bootstrap.Server" ], "versionOverride": { - "net9.0": "9.0.0-dev.286" + "net9.0": "9.0.0-dev.293" } }, { From dc6bacc80a07a7eb256a653365eeceae5a05ebf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 20 Sep 2024 11:25:49 -0400 Subject: [PATCH 37/38] chore: Include AOT workaround for net9 wasn --- src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index 650dd3a7c51b..7154072a3cdd 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -43,6 +43,19 @@ + + + true + true + + From 0e601f275251d54b5ee8126a2687e437519f52cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 20 Sep 2024 11:26:00 -0400 Subject: [PATCH 38/38] chore: Bump to latest net9 bootstrap --- 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 +- src/Directory.Build.targets | 4 ++-- src/Uno.Sdk/packages.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/ci/templates/dotnet-mobile-install-linux.yml b/build/ci/templates/dotnet-mobile-install-linux.yml index 365c688490c5..a0f6a49ee76b 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.26.0-dev.28' + UnoCheck_Version: '1.26.0-dev.40' steps: diff --git a/build/ci/templates/dotnet-mobile-install-mac.yml b/build/ci/templates/dotnet-mobile-install-mac.yml index ea70f1b7795e..e7d80408f109 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.26.0-dev.28' + UnoCheck_Version: '1.26.0-dev.40' steps: diff --git a/build/ci/templates/dotnet-mobile-install-windows.yml b/build/ci/templates/dotnet-mobile-install-windows.yml index ea70f1b7795e..e7d80408f109 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.26.0-dev.28' + UnoCheck_Version: '1.26.0-dev.40' steps: diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index f1dab0ef1723..304459b1ced9 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -75,8 +75,8 @@ - - + + diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index d8b20b7b3e69..9a8b1929aa54 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -32,7 +32,7 @@ "Uno.Wasm.Bootstrap.Server" ], "versionOverride": { - "net9.0": "9.0.0-dev.293" + "net9.0": "9.0.0-dev.296" } }, {