From 9bd0c1d4408b9a3913f079cfa131f985a74b6432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 15 Nov 2024 10:56:32 -0500 Subject: [PATCH 1/3] fix(wasm): workaround for invalid net9-browserwasm library detection --- .../test-scripts/run-net7-template-linux.ps1 | 3 ++ .../run-netcore-mobile-template-tests.ps1 | 3 ++ .../5.3/uno53net9Lib/Class1.cs | 6 +++ .../5.3/uno53net9Lib/global.json | 8 ++++ .../5.3/uno53net9Lib/uno53net9Lib.csproj | 41 +++++++++++++++++++ src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 3 ++ 6 files changed, 64 insertions(+) create mode 100644 src/SolutionTemplate/5.3/uno53net9Lib/Class1.cs create mode 100644 src/SolutionTemplate/5.3/uno53net9Lib/global.json create mode 100644 src/SolutionTemplate/5.3/uno53net9Lib/uno53net9Lib.csproj diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index 4d92516b0629..8d1d874c988c 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -80,6 +80,9 @@ $projects = # 5.3 Blank with net9 @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @()) + # 5.3 lib + @(2, "5.3/uno53net9blank/uno53net9Lib/uno53net9Lib.csproj", @(), @()) + # 5.3 blank publish testing # Disabled for LXD setup issues # @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f:net9.0-desktop", "-p:SelfContained=true", "-p:PackageFormat=snap"), @("Publish")) diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index f5321ab109e4..46f848a2a4d4 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -338,6 +338,9 @@ $projects = @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop"), @("macOS", "NetCore")), @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), @("macOS", "NetCore")), + # 5.3 Library + @(3, "5.3/uno53net9Lib/uno53net9Lib/uno53net9Lib.csproj", @(), @("macOS", "NetCore")), + # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. @(4, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()), diff --git a/src/SolutionTemplate/5.3/uno53net9Lib/Class1.cs b/src/SolutionTemplate/5.3/uno53net9Lib/Class1.cs new file mode 100644 index 000000000000..7066a6320a7d --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9Lib/Class1.cs @@ -0,0 +1,6 @@ +namespace uno52Lib; + +public class Class1 +{ +} + diff --git a/src/SolutionTemplate/5.3/uno53net9Lib/global.json b/src/SolutionTemplate/5.3/uno53net9Lib/global.json new file mode 100644 index 000000000000..df83353d73bc --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9Lib/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "allowPrerelease": true + }, + "msbuild-sdks": { + "Uno.Sdk.Private": "5.2.0-dev.2002" + } +} diff --git a/src/SolutionTemplate/5.3/uno53net9Lib/uno53net9Lib.csproj b/src/SolutionTemplate/5.3/uno53net9Lib/uno53net9Lib.csproj new file mode 100644 index 000000000000..1677aeb2ef9b --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9Lib/uno53net9Lib.csproj @@ -0,0 +1,41 @@ + + + net9.0;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041;net9.0-browserwasm;net9.0-desktop + + + $(TargetFrameworks);net9.0-android + + + $(TargetFrameworks.Replace('net9.0-android','')) + $(TargetFrameworks.Replace('net9.0-ios','')) + $(TargetFrameworks.Replace('net9.0-maccatalyst','')) + + + true + enable + enable + true + Library + true + + + + + + + + + + diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index cda84acaf8b0..08f034bc31b5 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -18,6 +18,9 @@ false + + false + true From f8a449da122a5545748190660bbb3e78c9bd6209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 15 Nov 2024 13:11:33 -0500 Subject: [PATCH 2/3] chore: Adjust test path --- build/test-scripts/run-net7-template-linux.ps1 | 2 +- build/test-scripts/run-netcore-mobile-template-tests.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index 8d1d874c988c..50b3c131cd73 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -81,7 +81,7 @@ $projects = @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @()) # 5.3 lib - @(2, "5.3/uno53net9blank/uno53net9Lib/uno53net9Lib.csproj", @(), @()) + @(2, "5.3/uno53net9Lib/uno53net9Lib.csproj", @(), @()) # 5.3 blank publish testing # Disabled for LXD setup issues diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index 46f848a2a4d4..0a66bbdc2004 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -339,7 +339,7 @@ $projects = @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), @("macOS", "NetCore")), # 5.3 Library - @(3, "5.3/uno53net9Lib/uno53net9Lib/uno53net9Lib.csproj", @(), @("macOS", "NetCore")), + @(3, "5.3/uno53net9Lib/uno53net9Lib.csproj", @(), @("macOS", "NetCore")), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. @(4, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()), From 8e5cb3ca4259544404e80001661cdd257afd01fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 15 Nov 2024 15:28:15 -0500 Subject: [PATCH 3/3] chore: Adjust end of line --- build/test-scripts/run-net7-template-linux.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index 50b3c131cd73..7f85d0fe3e53 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.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @()) + @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @()), # 5.3 lib @(2, "5.3/uno53net9Lib/uno53net9Lib.csproj", @(), @())