From d3e072e7f615e6e0365407617c07737a610fc396 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Thu, 25 Aug 2022 13:55:10 -0500 Subject: [PATCH 1/3] Obsolete OpenGLView --- src/Controls/src/Core/OpenGLView.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controls/src/Core/OpenGLView.cs b/src/Controls/src/Core/OpenGLView.cs index 414ba0a33129..9f7d8f96bbbe 100644 --- a/src/Controls/src/Core/OpenGLView.cs +++ b/src/Controls/src/Core/OpenGLView.cs @@ -5,6 +5,7 @@ namespace Microsoft.Maui.Controls { /// + [Obsolete("OpenGLView is obsolete as of .NET 7. To enable this view you will need to call `builder.UseMauiCompatibility` but it is currently untested and unsupported.")] public sealed class OpenGLView : View, IOpenGlViewController, IElementConfiguration { #region Statics From 560bf59e832a0346529dd528b5a37100515eafbc Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Fri, 26 Aug 2022 10:30:47 -0500 Subject: [PATCH 2/3] - add additional ignores --- .../Core/src/Android/Renderers/OpenGLViewRenderer.cs | 4 +--- src/Compatibility/Core/src/AppHostBuilderExtensions.cs | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compatibility/Core/src/Android/Renderers/OpenGLViewRenderer.cs b/src/Compatibility/Core/src/Android/Renderers/OpenGLViewRenderer.cs index 403b1e84ab8d..92d04bd5c749 100644 --- a/src/Compatibility/Core/src/Android/Renderers/OpenGLViewRenderer.cs +++ b/src/Compatibility/Core/src/Android/Renderers/OpenGLViewRenderer.cs @@ -10,10 +10,8 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.Android { - //public class OpenGLViewRenderer : ViewRenderer -#pragma warning disable CS0618 // Type or member is obsolete + [Obsolete] internal class OpenGLViewRenderer : ViewRenderer -#pragma warning restore CS0618 // Type or member is obsolete { bool _disposed; diff --git a/src/Compatibility/Core/src/AppHostBuilderExtensions.cs b/src/Compatibility/Core/src/AppHostBuilderExtensions.cs index 7435028e5c20..0604c85e3165 100644 --- a/src/Compatibility/Core/src/AppHostBuilderExtensions.cs +++ b/src/Compatibility/Core/src/AppHostBuilderExtensions.cs @@ -77,9 +77,11 @@ public static MauiAppBuilder UseMauiCompatibility(this MauiAppBuilder builder) #if !WINDOWS #if !(MACCATALYST || MACOS) +#pragma warning disable CS0618 // Type or member is obsolete #pragma warning disable CS0612 // Type or member is obsolete handlers.TryAddCompatibilityRenderer(typeof(OpenGLView), typeof(OpenGLViewRenderer)); #pragma warning restore CS0612 // Type or member is obsolete +#pragma warning restore CS0618 // Type or member is obsolete #endif #else #pragma warning disable CS0618 // Type or member is obsolete From 7ba32cb0e58794f24458d6d662304174b11545e5 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Fri, 26 Aug 2022 15:14:25 -0500 Subject: [PATCH 3/3] - fix obsolete --- .../ControlGallery/src/WinUI/RegistrarValidationService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Compatibility/ControlGallery/src/WinUI/RegistrarValidationService.cs b/src/Compatibility/ControlGallery/src/WinUI/RegistrarValidationService.cs index faf5c7b7e409..ddd9a940d6e7 100644 --- a/src/Compatibility/ControlGallery/src/WinUI/RegistrarValidationService.cs +++ b/src/Compatibility/ControlGallery/src/WinUI/RegistrarValidationService.cs @@ -6,6 +6,7 @@ [assembly: Dependency(typeof(RegistrarValidationService))] namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI { + [System.Obsolete] public class RegistrarValidationService : IRegistrarValidationService { public bool Validate(VisualElement element, out string message)