From b61687b07672071fb31d1511d1c28d5eac616e6a Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 2 Mar 2022 16:17:47 +0100 Subject: [PATCH] Keep CLSCompliantAttribute in sync for src <-> ref (#66075) ApiCompat actually ran validation for that attribute until the check was disabled with a675e1c2c4f46b98ecac1253223649d8f36d5da7. Enable it again and only disable it for baseline api compat validation, which is performed in ApiCompat.proj. --- eng/ApiCompatExcludeAttributes.txt | 1 - .../ref/System.Runtime.InteropServices.cs | 1 + src/libraries/apicompat/ApiCompatBaselineExcludedAttributes.txt | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/ApiCompatExcludeAttributes.txt b/eng/ApiCompatExcludeAttributes.txt index f324032096a6d..83aa68c922346 100644 --- a/eng/ApiCompatExcludeAttributes.txt +++ b/eng/ApiCompatExcludeAttributes.txt @@ -1,4 +1,3 @@ -T:System.CLSCompliantAttribute T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute T:System.Diagnostics.DebuggerGuidedStepThroughAttribute T:System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index d652dbb6bc60d..eac47acf63d96 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -1438,6 +1438,7 @@ public partial interface IConnectionPointContainer void EnumConnectionPoints(out System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints ppEnum); void FindConnectionPoint(ref System.Guid riid, out System.Runtime.InteropServices.ComTypes.IConnectionPoint? ppCP); } + [System.CLSCompliantAttribute(false)] [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)] public partial interface IDataObject { diff --git a/src/libraries/apicompat/ApiCompatBaselineExcludedAttributes.txt b/src/libraries/apicompat/ApiCompatBaselineExcludedAttributes.txt index e0462b40d366f..7cb41fe1bb531 100644 --- a/src/libraries/apicompat/ApiCompatBaselineExcludedAttributes.txt +++ b/src/libraries/apicompat/ApiCompatBaselineExcludedAttributes.txt @@ -1,4 +1,5 @@ // These attributes shouldn't be checked against baseline reference assemblies +T:System.CLSCompliantAttribute T:System.ComponentModel.EditorBrowsableAttribute T:System.ObsoleteAttribute