From 37b657267e7a09e92d4e256e218774b463fe4935 Mon Sep 17 00:00:00 2001 From: Adam Ratzman Date: Wed, 1 Mar 2023 16:14:07 -0800 Subject: [PATCH 1/2] Avoid duplicating My in settings type if no root namespace exists --- .../SettingsDesigner/SettingsSingleFileGeneratorBase.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb b/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb index a22516ef382..db626920d10 100644 --- a/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb +++ b/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb @@ -589,7 +589,7 @@ Namespace Microsoft.VisualStudio.Editors.SettingsDesigner fullTypeName = projectRootNamespace & "." End If - If defaultNamespace <> "" Then + If defaultNamespace <> "" And Not defaultNamespace.Equals(MyNamespaceName) Then ' defaultNamespace, if none exists, will come in thru wszDefaultNamespace as My. We don't want to duplicate it. fullTypeName &= defaultNamespace & "." End If From 0cd3ba3bc2ee5e812f761e2f9f286c63c2a14c04 Mon Sep 17 00:00:00 2001 From: Adam Ratzman Date: Thu, 2 Mar 2023 16:34:45 -0800 Subject: [PATCH 2/2] update check to AndAlso --- .../SettingsDesigner/SettingsSingleFileGeneratorBase.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb b/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb index db626920d10..ffaa670f8d4 100644 --- a/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb +++ b/src/Microsoft.VisualStudio.Editors/SettingsDesigner/SettingsSingleFileGeneratorBase.vb @@ -589,7 +589,7 @@ Namespace Microsoft.VisualStudio.Editors.SettingsDesigner fullTypeName = projectRootNamespace & "." End If - If defaultNamespace <> "" And Not defaultNamespace.Equals(MyNamespaceName) Then ' defaultNamespace, if none exists, will come in thru wszDefaultNamespace as My. We don't want to duplicate it. + If defaultNamespace <> "" AndAlso Not defaultNamespace.Equals(MyNamespaceName) Then ' defaultNamespace, if none exists, will come in thru wszDefaultNamespace as My. We don't want to duplicate it. fullTypeName &= defaultNamespace & "." End If