From 87668253078abcd2507f543251813e9a0931b22c Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:44:35 -0600 Subject: [PATCH 1/7] Update tooling pointer to latest https://github.com/CommunityToolkit/Tooling-Windows-Submodule/pull/230 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index d71b08b2..3268beda 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit d71b08b2dccf94c3ceaeda99526679bc0cfc3b8a +Subproject commit 3268beda87dfae9d56c3fe18d3e35a0f207bee7e From 00fde20eeb6054309b92add15557e22fcd4963f0 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:44:59 -0600 Subject: [PATCH 2/7] Upgrade to .NET 9.0 in Dockerfile, devcontainer.json, build.yml, and global.json --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 2 +- .github/workflows/build.yml | 2 +- global.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 34ace61b..6935449f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:8.0 +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0 # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 61655025..da7c1a47 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,7 @@ "args": { // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 // Append -bullseye or -focal to pin to an OS version. - "VARIANT": "8.0", + "VARIANT": "9.0", // Options "NODE_VERSION": "lts/*" } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f142ec04..1d6e32e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ on: merge_group: env: - DOTNET_VERSION: ${{ '8.0.201' }} + DOTNET_VERSION: ${{ '9.0.100' }} ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 diff --git a/global.json b/global.json index 91187a7c..d413698a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.403", + "version": "9.0.100", "rollForward": "latestFeature" }, "msbuild-sdks": From b736b19aa3fd086fade0ed68445a883c54fc47fa Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:45:09 -0600 Subject: [PATCH 3/7] Fix null reference by returning empty string for missing localization resources --- .../Extensions/src/Text/StringExtensions.Localization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Extensions/src/Text/StringExtensions.Localization.cs b/components/Extensions/src/Text/StringExtensions.Localization.cs index 080f238d..f6f1193b 100644 --- a/components/Extensions/src/Text/StringExtensions.Localization.cs +++ b/components/Extensions/src/Text/StringExtensions.Localization.cs @@ -54,11 +54,11 @@ public static string GetViewLocalized(this string resourceKey, UIContext? uiCont if (uiContext != null) { var resourceLoader = ResourceLoader.GetForUIContext(uiContext); - return resourceLoader.GetString(resourceKey); + return resourceLoader?.GetString(resourceKey) ?? string.Empty; } else { - return ResourceLoader.GetForCurrentView().GetString(resourceKey); + return ResourceLoader.GetForCurrentView().GetString(resourceKey) ?? string.Empty; } } #endif From 4fadfdbffffa6e63615e1a77ddee6f61d5932e76 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:54:26 -0600 Subject: [PATCH 4/7] Improved null value handling, fixes net9.0 errors --- .../src/ResourceNameToResourceStringConverter.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index f8341eca..ab9bf03b 100644 --- a/components/Converters/src/ResourceNameToResourceStringConverter.cs +++ b/components/Converters/src/ResourceNameToResourceStringConverter.cs @@ -34,15 +34,16 @@ public sealed partial class ResourceNameToResourceStringConverter : IValueConver /// The string corresponding to the resource name. public object Convert(object value, Type targetType, object parameter, string language) { - if (value == null) + var stringValue = value?.ToString(); + if (stringValue is null) { return string.Empty; } #if WINAPPSDK && !HAS_UNO - return _resourceManager.MainResourceMap.TryGetValue(value.ToString()).ValueAsString; + return _resourceManager.MainResourceMap.TryGetValue(stringValue).ValueAsString; #else - return _resourceLoader.GetString(value.ToString()); + return _resourceLoader.GetString(stringValue) ?? string.Empty; #endif } From a366251ea35058181f8e45f1ea923834bee9fd16 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 15:00:21 -0600 Subject: [PATCH 5/7] Update tooling with wasm head fix --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 3268beda..b1f50560 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 3268beda87dfae9d56c3fe18d3e35a0f207bee7e +Subproject commit b1f505601d520ef54d7369c68202e99a6ddbc93b From f03f4071caa57c0ca7ec3b1f106bb199248f8239 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 22 Nov 2024 14:25:44 -0600 Subject: [PATCH 6/7] Update package versions, update tooling pointer --- Directory.Build.targets | 2 +- components/Behaviors/src/Dependencies.props | 4 ++-- components/Media/src/Dependencies.props | 2 +- tooling | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index e3c75c2c..4f8f2ee7 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,7 +1,7 @@ - + diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 3f06d427..aec754a1 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -16,7 +16,7 @@ - + @@ -26,6 +26,6 @@ - + diff --git a/components/Media/src/Dependencies.props b/components/Media/src/Dependencies.props index 04c44f45..fad06d5e 100644 --- a/components/Media/src/Dependencies.props +++ b/components/Media/src/Dependencies.props @@ -12,7 +12,7 @@ - + diff --git a/tooling b/tooling index b1f50560..89d14cb1 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit b1f505601d520ef54d7369c68202e99a6ddbc93b +Subproject commit 89d14cb12982634dd10e8908f5eda63a73a0a81f From 8f735f617adf073e77cde5f5fad00018f7412679 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 13 Dec 2024 17:25:02 -0600 Subject: [PATCH 7/7] Update subproject commit reference in tooling --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 4fac6839..83624f68 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 4fac683906a559a36e27727d144b54df4f522895 +Subproject commit 83624f6874a8255cf46afc419cb8da5844de6e89