diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs index 8538e63c068801..a6351198a2c595 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs @@ -300,6 +300,7 @@ public static void RegisterForTrackerSupport(ComWrappers instance) /// * P/Invokes with COM-related types /// * COM activation /// + [SupportedOSPlatform("windows")] public static void RegisterForMarshalling(ComWrappers instance) { if (instance == null) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.PlatformNotSupported.cs index 2cfac1e1919e90..f2701035b93ab5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.PlatformNotSupported.cs @@ -41,6 +41,7 @@ public static void RegisterForTrackerSupport(ComWrappers instance) throw new PlatformNotSupportedException(); } + [SupportedOSPlatform("windows")] public static void RegisterForMarshalling(ComWrappers instance) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs index 72019f3d833cc4..ff16e14d4e39d5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs @@ -69,7 +69,11 @@ public enum CreateObjectFlags /// /// Class for managing wrappers of COM IUnknown types. /// - [SupportedOSPlatform("windows")] + [UnsupportedOSPlatform("android")] + [UnsupportedOSPlatform("browser")] + [UnsupportedOSPlatform("ios")] + [UnsupportedOSPlatform("maccatalyst")] + [UnsupportedOSPlatform("tvos")] [CLSCompliant(false)] public abstract partial class ComWrappers { 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 e6c03d03d24181..feb8ae7135abb5 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -1125,7 +1125,11 @@ public enum CreateObjectFlags Aggregation = 4, Unwrap = 8, } - [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] + [System.Runtime.Versioning.UnsupportedOSPlatform("android")] + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [System.Runtime.Versioning.UnsupportedOSPlatform("maccatalyst")] + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] [System.CLSCompliantAttribute(false)] public abstract class ComWrappers { @@ -1147,6 +1151,7 @@ public struct ComInterfaceDispatch public object GetOrRegisterObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags, object wrapper, System.IntPtr inner) { throw null; } protected abstract void ReleaseObjects(System.Collections.IEnumerable objects); public static void RegisterForTrackerSupport(ComWrappers instance) { } + [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] public static void RegisterForMarshalling(ComWrappers instance) { } protected static void GetIUnknownImpl(out System.IntPtr fpQueryInterface, out System.IntPtr fpAddRef, out System.IntPtr fpRelease) { throw null; } } diff --git a/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt index 8a50ec864714be..dd2e06b69c3c29 100644 --- a/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt +++ b/src/libraries/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt @@ -1,5 +1,6 @@ Compat issues with assembly System.Runtime.InteropServices: TypesMustExist : Type 'System.Runtime.InteropServices.AssemblyRegistrationFlags' does not exist in the reference but it does exist in the implementation. +CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Runtime.InteropServices.ComWrappers' changed from '[UnsupportedOSPlatformAttribute("android")]' in the implementation to '[UnsupportedOSPlatformAttribute("android")]' in the reference. TypesMustExist : Type 'System.Runtime.InteropServices.ExporterEventKind' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplAttribute' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplType' does not exist in the reference but it does exist in the implementation. @@ -7,5 +8,4 @@ TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationClassContext' TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationConnectionType' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute' does not exist in the reference but it does exist in the implementation. MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.InteropServices.ComTypes.IDataObject' in the implementation but not the reference. Total Issues: 9 diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj index f0ffe70d47c314..5235b8023a63dd 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj @@ -137,6 +137,7 @@ + diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AddRefTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AddRefTests.cs index c8cd89168b3526..ec5ae351bc79c0 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AddRefTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AddRefTests.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Runtime.InteropServices.Tests.Common; using Xunit; namespace System.Runtime.InteropServices.Tests @@ -8,10 +9,11 @@ namespace System.Runtime.InteropServices.Tests public class AddRefTests { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [SkipOnMono("ComWrappers are not supported on Mono")] public void AddRef_ValidPointer_Success() { - IntPtr iUnknown = Marshal.GetIUnknownForObject(new object()); + var cw = new ComWrappersImpl(); + IntPtr iUnknown = cw.GetOrCreateComInterfaceForObject(new object(), CreateComInterfaceFlags.None); try { Assert.Equal(2, Marshal.AddRef(iUnknown)); diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/Common/COMWrappersImpl.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/Common/COMWrappersImpl.cs new file mode 100644 index 00000000000000..f6b7180c299e3b --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/Common/COMWrappersImpl.cs @@ -0,0 +1,43 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections; +using System.Runtime.CompilerServices; +using Xunit; + +namespace System.Runtime.InteropServices.Tests.Common +{ + public class ComWrappersImpl : ComWrappers + { + // Doesn't represent a real interface. The value is only used to support a call to QueryInterface for testing. + public const string IID_TestQueryInterface = "1F906666-B388-4729-B78C-826BC5FD4245"; + + protected unsafe override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) + { + Assert.Equal(CreateComInterfaceFlags.None, flags); + + IntPtr fpQueryInterface = default; + IntPtr fpAddRef = default; + IntPtr fpRelease = default; + ComWrappers.GetIUnknownImpl(out fpQueryInterface, out fpAddRef, out fpRelease); + + var vtblRaw = (IntPtr*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(ComWrappersImpl), IntPtr.Size * 3); + vtblRaw[0] = fpQueryInterface; + vtblRaw[1] = fpAddRef; + vtblRaw[2] = fpRelease; + + var entryRaw = (ComInterfaceEntry*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(ComWrappersImpl), sizeof(ComInterfaceEntry)); + entryRaw->IID = new Guid(IID_TestQueryInterface); + entryRaw->Vtable = (IntPtr)vtblRaw; + + count = 1; + return entryRaw; + } + + protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flag) + => throw new NotImplementedException(); + + protected override void ReleaseObjects(IEnumerable objects) + => throw new NotImplementedException(); + } +} diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.Windows.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.Windows.cs index 30657253cc8248..74ffdaad3b2dbd 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.Windows.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.Windows.cs @@ -9,6 +9,7 @@ namespace System.Runtime.InteropServices.Tests { public partial class QueryInterfaceTests { + public const string IID_IDISPATCH = "00020400-0000-0000-C000-000000000046"; public const string IID_IINSPECTABLE = "AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90"; public static IEnumerable QueryInterface_ValidComObjectInterface_TestData() @@ -45,7 +46,25 @@ public static IEnumerable QueryInterface_ValidComObjectInterface_TestD [MemberData(nameof(QueryInterface_ValidComObjectInterface_TestData))] public void QueryInterface_ValidComObjectInterface_Success(object o, string iidString) { - QueryInterface_ValidInterface_Success(o, iidString); + IntPtr ptr = Marshal.GetIUnknownForObject(o); + try + { + Guid guid = new Guid(iidString); + Assert.Equal(0, Marshal.QueryInterface(ptr, ref guid, out IntPtr ppv)); + Assert.NotEqual(IntPtr.Zero, ppv); + try + { + Assert.Equal(new Guid(iidString), guid); + } + finally + { + Marshal.Release(ppv); + } + } + finally + { + Marshal.Release(ptr); + } } public static IEnumerable QueryInterface_NoSuchComObjectInterface_TestData() @@ -83,7 +102,18 @@ public static IEnumerable QueryInterface_NoSuchComObjectInterface_Test [MemberData(nameof(QueryInterface_NoSuchComObjectInterface_TestData))] public void QueryInterface_NoSuchComObjectInterface_Success(object o, string iidString) { - QueryInterface_NoSuchInterface_Success(o, iidString); + IntPtr ptr = Marshal.GetIUnknownForObject(o); + try + { + Guid iid = new Guid(iidString); + Assert.Equal(E_NOINTERFACE, Marshal.QueryInterface(ptr, ref iid, out IntPtr ppv)); + Assert.Equal(IntPtr.Zero, ppv); + Assert.Equal(new Guid(iidString), iid); + } + finally + { + Marshal.Release(ptr); + } } } } diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs index fbb7ca8c0fa6bd..a52f710abf5760 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs @@ -12,71 +12,28 @@ public partial class QueryInterfaceTests { public const int E_NOINTERFACE = unchecked((int)0x80004002); public const string IID_IUNKNOWN = "00000000-0000-0000-C000-000000000046"; - public const string IID_IDISPATCH = "00020400-0000-0000-C000-000000000046"; public static IEnumerable QueryInterface_ValidInterface_TestData() { yield return new object[] { new object(), IID_IUNKNOWN }; - yield return new object[] { new object(), IID_IDISPATCH }; - - yield return new object[] { 10, IID_IUNKNOWN }; - if (!PlatformDetection.IsNetCore) - { - yield return new object[] { 10, IID_IDISPATCH }; - } - - yield return new object[] { "string", IID_IUNKNOWN }; - if (!PlatformDetection.IsNetCore) - { - yield return new object[] { "string", IID_IDISPATCH }; - } - - yield return new object[] { new NonGenericClass(), IID_IUNKNOWN }; - if (!PlatformDetection.IsNetCore) - { - yield return new object[] { new NonGenericClass(), IID_IDISPATCH }; - } - yield return new object[] { new GenericClass(), IID_IUNKNOWN }; - - yield return new object[] { new NonGenericStruct(), IID_IUNKNOWN }; - if (!PlatformDetection.IsNetCore) - { - yield return new object[] { new NonGenericStruct(), IID_IDISPATCH }; - } - yield return new object[] { new GenericStruct(), IID_IUNKNOWN }; - - yield return new object[] { Int32Enum.Value1, IID_IUNKNOWN }; - if (!PlatformDetection.IsNetCore) - { - yield return new object[] { Int32Enum.Value1, IID_IDISPATCH }; - } - - yield return new object[] { new int[] { 10 }, IID_IUNKNOWN }; - yield return new object[] { new int[][] { new int[] { 10 } }, IID_IUNKNOWN }; - yield return new object[] { new int[,] { { 10 } }, IID_IUNKNOWN }; - - MethodInfo method = typeof(GetObjectForIUnknownTests).GetMethod(nameof(NonGenericMethod), BindingFlags.NonPublic | BindingFlags.Static); - Delegate d = method.CreateDelegate(typeof(NonGenericDelegate)); - yield return new object[] { d, IID_IUNKNOWN }; - yield return new object[] { d, IID_IDISPATCH }; - - yield return new object[] { new KeyValuePair("key", 10), IID_IUNKNOWN }; + yield return new object[] { new object(), ComWrappersImpl.IID_TestQueryInterface }; } [Theory] [MemberData(nameof(QueryInterface_ValidInterface_TestData))] - [PlatformSpecific(TestPlatforms.Windows)] - public void QueryInterface_ValidInterface_Success(object o, string guid) + [SkipOnMono("ComWrappers are not supported on Mono")] + public void QueryInterface_ValidInterface_Success(object o, string iidString) { - IntPtr ptr = Marshal.GetIUnknownForObject(o); + var cw = new ComWrappersImpl(); + IntPtr ptr = cw.GetOrCreateComInterfaceForObject(o, CreateComInterfaceFlags.None); try { - Guid iidString = new Guid(guid); - Assert.Equal(0, Marshal.QueryInterface(ptr, ref iidString, out IntPtr ppv)); + Guid guid = new Guid(iidString); + Assert.Equal(0, Marshal.QueryInterface(ptr, ref guid, out IntPtr ppv)); Assert.NotEqual(IntPtr.Zero, ppv); try { - Assert.Equal(new Guid(guid), iidString); + Assert.Equal(new Guid(iidString), guid); } finally { @@ -93,23 +50,15 @@ public static IEnumerable QueryInterface_NoSuchInterface_TestData() { yield return new object[] { new object(), Guid.Empty.ToString() }; yield return new object[] { new object(), "927971f5-0939-11d1-8be1-00c04fd8d503" }; - - yield return new object[] { new int[] { 10 }, IID_IDISPATCH }; - yield return new object[] { new int[][] { new int[] { 10 } }, IID_IDISPATCH }; - yield return new object[] { new int[,] { { 10 } }, IID_IDISPATCH }; - - yield return new object[] { new GenericClass(), IID_IDISPATCH }; - yield return new object[] { new Dictionary(), IID_IDISPATCH }; - yield return new object[] { new GenericStruct(), IID_IDISPATCH }; - yield return new object[] { new KeyValuePair(), IID_IDISPATCH }; } [Theory] [MemberData(nameof(QueryInterface_NoSuchInterface_TestData))] - [PlatformSpecific(TestPlatforms.Windows)] + [SkipOnMono("ComWrappers are not supported on Mono")] public void QueryInterface_NoSuchInterface_Success(object o, string iidString) { - IntPtr ptr = Marshal.GetIUnknownForObject(o); + var cw = new ComWrappersImpl(); + IntPtr ptr = cw.GetOrCreateComInterfaceForObject(o, CreateComInterfaceFlags.None); try { Guid iid = new Guid(iidString); @@ -129,10 +78,5 @@ public void QueryInterface_ZeroPointer_ThrowsArgumentNullException() Guid iid = Guid.Empty; AssertExtensions.Throws("pUnk", () => Marshal.QueryInterface(IntPtr.Zero, ref iid, out IntPtr ppv)); } - - private static void NonGenericMethod(int i) { } - public delegate void NonGenericDelegate(int i); - - public enum Int32Enum : int { Value1, Value2 } } } diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs index 211270c6995785..3ef69cfc0920fc 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseTests.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Runtime.InteropServices.Tests.Common; using Xunit; namespace System.Runtime.InteropServices.Tests @@ -8,10 +9,11 @@ namespace System.Runtime.InteropServices.Tests public class ReleaseTests { [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [SkipOnMono("ComWrappers are not supported on Mono")] public void Release_ValidPointer_Success() { - IntPtr iUnknown = Marshal.GetIUnknownForObject(new object()); + var cw = new ComWrappersImpl(); + IntPtr iUnknown = cw.GetOrCreateComInterfaceForObject(new object(), CreateComInterfaceFlags.None); try { Marshal.AddRef(iUnknown); diff --git a/src/libraries/shims/ApiCompat.proj b/src/libraries/shims/ApiCompat.proj index 9885f574fc6d80..4ade3e1c90441e 100644 --- a/src/libraries/shims/ApiCompat.proj +++ b/src/libraries/shims/ApiCompat.proj @@ -107,7 +107,7 @@ - + diff --git a/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt b/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt index 54945167821c83..69f17447741d89 100644 --- a/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt +++ b/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt @@ -89,6 +89,8 @@ CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Ru CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.Marshal.AddRef(System.IntPtr)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.Marshal.QueryInterface(System.IntPtr, System.Guid, System.IntPtr)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.Marshal.Release(System.IntPtr)' in the contract but not the implementation. +CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesCcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. +CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesGcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Security.Cryptography.CryptoConfig' in the contract but not the implementation. Compat issues with assembly System: CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerAttribute' on 'System.ComponentModel.IComponent' changed from '[DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]' in the contract to '[DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]' in the implementation. @@ -164,13 +166,14 @@ CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Ru CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.Versioning.SupportedOSPlatformAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Module | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Module | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]' in the implementation. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Module | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Module | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]' in the implementation. Compat issues with assembly System.Runtime.InteropServices: +CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.ComWrappers' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.Marshal.AddRef(System.IntPtr)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.Marshal.QueryInterface(System.IntPtr, System.Guid, System.IntPtr)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' exists on 'System.Runtime.InteropServices.Marshal.Release(System.IntPtr)' in the contract but not the implementation. Compat issues with assembly System.Security.Cryptography.Algorithms: +CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesCcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. +CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesGcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Security.Cryptography.CryptoConfig' in the contract but not the implementation. -Compat issues with assembly System.Threading.Tasks.Extensions: -CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.CompilerServices.AsyncMethodBuilderAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation. Compat issues with assembly System.Text.Json: CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' exists on parameter 'returnType' on member 'System.Text.Json.JsonSerializer.Deserialize(System.ReadOnlySpan, System.Type, System.Text.Json.JsonSerializerOptions)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' exists on parameter 'returnType' on member 'System.Text.Json.JsonSerializer.Deserialize(System.String, System.Type, System.Text.Json.JsonSerializerOptions)' in the contract but not the implementation. @@ -180,9 +183,7 @@ CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAc CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' exists on parameter 'inputType' on member 'System.Text.Json.JsonSerializer.Serialize(System.Text.Json.Utf8JsonWriter, System.Object, System.Type, System.Text.Json.JsonSerializerOptions)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' exists on parameter 'inputType' on member 'System.Text.Json.JsonSerializer.SerializeAsync(System.IO.Stream, System.Object, System.Type, System.Text.Json.JsonSerializerOptions, System.Threading.CancellationToken)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' exists on parameter 'inputType' on member 'System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(System.Object, System.Type, System.Text.Json.JsonSerializerOptions)' in the contract but not the implementation. -CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesCcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. -CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesGcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. -CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesCcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. -CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.AesGcm' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Text.Json.Serialization.JsonConverterAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple=false)]' in the implementation. -Total Issues: 171 +Compat issues with assembly System.Threading.Tasks.Extensions: +CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.CompilerServices.AsyncMethodBuilderAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation. +Total Issues: 172