diff --git a/eng/Analyzers.props b/eng/Analyzers.props
index 17755195e0069490c497b7dd698cefdb71d271d4..4405ca11687feb71ba29ee6f0d56d7c3b07f48ce 100644
--- a/eng/Analyzers.props
+++ b/eng/Analyzers.props
@@ -6,8 +6,8 @@
-
-
-
+
+
+
diff --git a/eng/Versions.props b/eng/Versions.props
index b83e2dd249c0c58dcbf9fd816b4600eb6ddba02b..1a3373ee672e6e3d3644775167303326863cf737 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -51,6 +51,8 @@
+ 6.0.0-preview1.20513.4
+ 3.8.0-4.20503.2
5.0.0-beta.20506.7
5.0.0-beta.20506.7
5.0.0-beta.20506.7
@@ -69,6 +71,7 @@
5.0.0-preview.8.20359.4
+ 1.2.0-beta.205
4.5.1
4.3.0
4.3.0
diff --git a/eng/versioning.targets b/eng/versioning.targets
index efb7af48b76cb5f125418d19eed282ff764dff53..61789747403d7b648e7f2ff70b18684c8805898c 100644
--- a/eng/versioning.targets
+++ b/eng/versioning.targets
@@ -22,8 +22,8 @@
-
-
+
+
<_Parameter1>windows
@@ -33,9 +33,9 @@
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
-
+
-
+
<_Parameter1>%(_unsupportedOSPlatforms.Identity)
diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
index 3a88bad3b1d8e7635f8da6e6eb4370d02f435937..6caaede63b1f6eb7ae90b4f1b4e575f2765c671d 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
@@ -9,6 +9,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
+using System.Runtime.Versioning;
//
// Types in this file marked as 'public' are done so only to aid in
@@ -108,6 +109,7 @@ public static unsafe ComActivationContext Create(ref ComActivationContextInterna
}
}
+ [SupportedOSPlatform("windows")]
public static class ComActivator
{
#if FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs
index d8a0ea49e7d55bc81ebf17466695f6f47802ecce..ac434ad00d9bc8a923c30483a6171bb86a483c03 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsInfo.cs
@@ -1,8 +1,11 @@
// 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.Versioning;
+
namespace System.Runtime.InteropServices
{
+ [SupportedOSPlatform("windows")]
internal class ComEventsInfo
{
private ComEventsSink? _sinks;
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs
index e871eca76361ba20da32f0e78d088f6244a103ec..d0e230a6e5644668824b3d63f94ec41aa6b937b8 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/ComDataHelpers.cs
@@ -1,10 +1,13 @@
// 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.Versioning;
+
namespace System.Runtime.InteropServices.CustomMarshalers
{
internal static class ComDataHelpers
{
+ [SupportedOSPlatform("windows")]
public static TView GetOrCreateManagedViewFromComData(object comObject, Func createCallback)
{
object key = typeof(TView);
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs
index 10034bae86a091d03200a2adde7d13b6464457b0..3bd63b33612f89b63a0cc04fbf237731b7f5b79a 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableToDispatchMarshaler.cs
@@ -2,9 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
+using System.Runtime.Versioning;
namespace System.Runtime.InteropServices.CustomMarshalers
{
+ [SupportedOSPlatform("windows")]
internal class EnumerableToDispatchMarshaler : ICustomMarshaler
{
private static readonly EnumerableToDispatchMarshaler s_enumerableToDispatchMarshaler = new EnumerableToDispatchMarshaler();
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs
index 06f1f083ce208169c90ae06f162b8810c7eceb82..a64da6919c2ed6b76a4108d26cd8bc0ab31c1ecf 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumerableViewOfDispatch.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.Diagnostics;
using System.Runtime.InteropServices.ComTypes;
namespace System.Runtime.InteropServices.CustomMarshalers
@@ -38,6 +39,7 @@ public System.Collections.IEnumerator GetEnumerator()
IntPtr.Zero);
}
+ Debug.Assert(OperatingSystem.IsWindows());
IntPtr enumVariantPtr = IntPtr.Zero;
try
{
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs
index 61e65f833d89c38baaa62449898f626cce9cc907..b4718f5e7c2851ca5d8a8bc8aa6dca35653203a8 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/CustomMarshalers/EnumeratorToEnumVariantMarshaler.cs
@@ -2,10 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
+using System.Runtime.Versioning;
using ComTypes = System.Runtime.InteropServices.ComTypes;
namespace System.Runtime.InteropServices.CustomMarshalers
{
+ [SupportedOSPlatform("windows")]
internal class EnumeratorToEnumVariantMarshaler : ICustomMarshaler
{
private static readonly EnumeratorToEnumVariantMarshaler s_enumeratorToEnumVariantMarshaler = new EnumeratorToEnumVariantMarshaler();
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs
index 85f2f68b6c2e1bf9534cfa6b15fe843f409204c7..b92ed244e5cedab008ad3905a4232f7333892bfb 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs
@@ -4234,6 +4234,7 @@ private static void WrapArgsForInvokeCall(object[] aArgs, int[] aArgsWrapperType
aArgs[i] = new UnknownWrapper(aArgs[i]);
break;
case DispatchWrapperType.Dispatch:
+ Debug.Assert(OperatingSystem.IsWindows());
aArgs[i] = new DispatchWrapper(aArgs[i]);
break;
case DispatchWrapperType.Error:
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs
index 595051fd2160fb58e878bdd8f1cdb3bd793a8248..097277e894d9db948b784f5dd362436177e2468d 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs
@@ -16,6 +16,7 @@ private static ThreadPoolBoundHandle BindHandleCore(SafeHandle handle)
try
{
+ Debug.Assert(OperatingSystem.IsWindows());
// ThreadPool.BindHandle will always return true, otherwise, it throws. See the underlying FCall
// implementation in ThreadPoolNative::CorBindIoCompletionCallback to see the implementation.
bool succeeded = ThreadPool.BindHandle(handle);
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs
index 8ab1589db9658fd0623d4abf5826c586e814051e..0ac6557579356eb577dd5559f79322b3580d41fa 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs
@@ -279,6 +279,7 @@ public Variant(object? obj)
else if (obj is DispatchWrapper)
{
vt = VarEnum.VT_DISPATCH;
+ Debug.Assert(OperatingSystem.IsWindows());
obj = ((DispatchWrapper)obj).WrappedObject;
}
else if (obj is ErrorWrapper)
@@ -401,6 +402,7 @@ internal static void MarshalHelperCastVariant(object pValue, int vt, ref Variant
switch (vt)
{
case 9: /*VT_DISPATCH*/
+ Debug.Assert(OperatingSystem.IsWindows());
v = new Variant(new DispatchWrapper(pValue));
break;
@@ -442,7 +444,9 @@ internal static void MarshalHelperCastVariant(object pValue, int vt, ref Variant
6 => /*VT_CY*/ new Variant(new CurrencyWrapper(iv.ToDecimal(provider))),
7 => /*VT_DATE*/ new Variant(iv.ToDateTime(provider)),
8 => /*VT_BSTR*/ new Variant(iv.ToString(provider)),
+#pragma warning disable CA1416 // Validate platform compatibility
9 => /*VT_DISPATCH*/ new Variant(new DispatchWrapper((object)iv)),
+#pragma warning restore CA1416
10 => /*VT_ERROR*/ new Variant(new ErrorWrapper(iv.ToInt32(provider))),
11 => /*VT_BOOL*/ new Variant(iv.ToBoolean(provider)),
12 => /*VT_VARIANT*/ new Variant((object)iv),
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs b/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs
index 9015a016a7e9efde0b7b22e2af6a18656821a52f..be3294ffdf6edd7fe6a54d92cd3ebc73607f148a 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/__ComObject.cs
@@ -4,6 +4,7 @@
using System.Collections;
using System.Runtime.InteropServices;
using System.Reflection;
+using System.Runtime.Versioning;
namespace System
{
@@ -11,6 +12,7 @@ namespace System
/// __ComObject is the root class for all COM wrappers. This class defines only
/// the basics. This class is used for wrapping COM objects accessed from managed.
///
+ [SupportedOSPlatform("windows")]
internal class __ComObject : MarshalByRefObject
{
private Hashtable? m_ObjectToDataMap; // Do not rename (runtime relies on this name).
diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs
index e9b6cd0370f6cfdb2ef6cf4a154490e89d7f5764..58bc43b0fd3b1e6cc592986bc499b6cede4e3804 100644
--- a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs
+++ b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsSink.cs
@@ -4,6 +4,7 @@
#nullable enable
using System.Diagnostics;
+using System.Runtime.Versioning;
namespace System.Runtime.InteropServices
{
@@ -11,6 +12,7 @@ namespace System.Runtime.InteropServices
/// Part of ComEventHelpers APIs which allow binding
/// managed delegates to COM's connection point based events.
///
+ [SupportedOSPlatform("windows")]
internal partial class ComEventsSink : IDispatch, ICustomQueryInterface
{
private Guid _iidSourceItf;
diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs b/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs
index f845179c5106649fce6fc608f90bcbd9cb7440ac..6a36190e1849d20c70c6628903cacf9f4136d039 100644
--- a/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs
+++ b/src/libraries/Common/src/System/Runtime/InteropServices/Variant.cs
@@ -4,6 +4,7 @@
#nullable enable
using System.Diagnostics;
+using System.Runtime.Versioning;
namespace System.Runtime.InteropServices
{
@@ -13,6 +14,7 @@ namespace System.Runtime.InteropServices
/// to and from COM calls.
///
[StructLayout(LayoutKind.Explicit)]
+ [SupportedOSPlatform("windows")]
internal partial struct Variant
{
#if DEBUG
diff --git a/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj b/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj
index debefca061677c0a4243200a60d8f4beaf90b9ba..efc623ec5a24485097f5b55248e31513df726c94 100644
--- a/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj
+++ b/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj
@@ -5,6 +5,7 @@
net461-Windows_NT
enable
$(OutputPath)$(AssemblyName).xml
+ true
true
diff --git a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
index 922902e5d964dc3e6212a9aedb04630be711b947..f9270fae1eee98da7e704bbf153b62a94222d8cc 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
+++ b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
@@ -496,6 +496,7 @@ public sealed partial class Interaction
public static object? CallByName(object? ObjectRef, string ProcName, Microsoft.VisualBasic.CallType UseCallType, params object?[] Args) { throw null; }
public static object? Choose(double Index, params object?[] Choice) { throw null; }
public static string Command() { throw null; }
+ [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static object CreateObject(string ProgId, string? ServerName = "") { throw null; }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public static void DeleteSetting(string AppName, string? Section = null, string? Key = null) { }
diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb
index 61fe5bc8ec2bee1bbb456a3b507c30476dbf0be2..b7b532e8eb3ef901abb584a7ca2afa857d7ed3c6 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb
+++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb
@@ -266,6 +266,7 @@ Namespace Microsoft.VisualBasic.CompilerServices
If UseCallType = CallType.Set Then
flags = flags Or BindingFlags.PutRefDispProperty
If args(args.GetUpperBound(0)) Is Nothing Then
+ Debug.Assert(OperatingSystem.IsWindows())
#Disable Warning BC40000 ' DispatchWrapper is marked obsolete.
args(args.GetUpperBound(0)) = New DispatchWrapper(Nothing)
#Enable Warning BC40000
diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb
index bb3b41868d525403d5407f10fdb34bc2ca4fa49c..ec9ddddb4ca0a758068982db51fbc80de88d43b0 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb
+++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb
@@ -494,6 +494,7 @@ Namespace Microsoft.VisualBasic
End If
End Sub
+
Public Function CreateObject(ByVal ProgId As String, Optional ByVal ServerName As String = "") As Object
'Creates local or remote COM2 objects. Should not be used to create COM+ objects.
'Applications that need to be STA should set STA either on their Sub Main via STAThreadAttribute
diff --git a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs
index 8f6e8b6270f59f39a1e62846e4faaa81b4849cd7..1b740db20bef22f488d0d169639c01756b945814 100644
--- a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs
+++ b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs
@@ -466,9 +466,10 @@ public partial class PermissiveModifyControl : System.DirectoryServices.Protocol
}
public delegate System.Security.Cryptography.X509Certificates.X509Certificate QueryClientCertificateCallback(System.DirectoryServices.Protocols.LdapConnection connection, byte[][] trustedCAs);
public delegate System.DirectoryServices.Protocols.LdapConnection QueryForConnectionCallback(System.DirectoryServices.Protocols.LdapConnection primaryConnection, System.DirectoryServices.Protocols.LdapConnection referralFromConnection, string newDistinguishedName, System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.Net.NetworkCredential credential, long currentUserToken);
+ [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public partial class QuotaControl : System.DirectoryServices.Protocols.DirectoryControl
{
- public QuotaControl() : base (default(string), default(byte[]), default(bool), default(bool)) { }
+ public QuotaControl() : base (default(string), default(byte[]), default(bool), default(bool)) { }
public QuotaControl(System.Security.Principal.SecurityIdentifier querySid) : base (default(string), default(byte[]), default(bool), default(bool)) { }
public System.Security.Principal.SecurityIdentifier QuerySid { get { throw null; } set { } }
public override byte[] GetValue() { throw null; }
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs
index 4341ca2c60d469b427bac03fcdb1674e1078c484..ce1b60c24b1174be52cd53d86a65be3f11768771 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs
@@ -7,6 +7,7 @@
using System.Text;
using System.Runtime.InteropServices;
using System.Security.Principal;
+using System.Runtime.Versioning;
namespace System.DirectoryServices.Protocols
{
@@ -1020,6 +1021,7 @@ public byte[] ContextId
public ResultCode Result { get; }
}
+ [SupportedOSPlatform("windows")]
public class QuotaControl : DirectoryControl
{
private byte[] _sid;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/StandardOleMarshalObject.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/StandardOleMarshalObject.Windows.cs
index b23676166c119698c2ec3033b1718ded7f6db428..175c1fc58d0a2d31486f76861c65fc24b4f26f88 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/StandardOleMarshalObject.Windows.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/StandardOleMarshalObject.Windows.cs
@@ -21,6 +21,7 @@ protected StandardOleMarshalObject()
private IntPtr GetStdMarshaler(ref Guid riid, int dwDestContext, int mshlflags)
{
+ Debug.Assert(OperatingSystem.IsWindows());
IntPtr pUnknown = Marshal.GetIUnknownForObject(this);
if (pUnknown != IntPtr.Zero)
{
@@ -69,6 +70,7 @@ unsafe int IMarshal.GetMarshalSizeMax(ref Guid riid, IntPtr pv, int dwDestContex
}
finally
{
+ Debug.Assert(OperatingSystem.IsWindows());
Marshal.Release(pStandardMarshal);
}
}
@@ -91,6 +93,7 @@ unsafe int IMarshal.MarshalInterface(IntPtr pStm, ref Guid riid, IntPtr pv, int
}
finally
{
+ Debug.Assert(OperatingSystem.IsWindows());
Marshal.Release(pStandardMarshal);
}
}
diff --git a/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj b/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj
index 6a6d9a6a5b3c98df168a98639214723423a23ca5..8deeb858dbbcfeee5db04801f25c16de4e75ef8d 100644
--- a/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj
+++ b/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj
@@ -2,6 +2,7 @@
true
netstandard2.0;netstandard2.0-Windows_NT
+ true
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 6112112d59bc604dea9c7a0b67d2d97cb60dcd50..9bbb8e80f31da49ee7f285cbebf5b1459638a15f 100644
--- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs
+++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs
@@ -76,6 +76,7 @@ public partial class UnmanagedMemoryAccessor : System.IDisposable
}
namespace System.Runtime.CompilerServices
{
+ [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
[System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter, Inherited=false)]
public sealed partial class IDispatchConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute
{
diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs
index 3a3b8329e4c58e0a7664e5a67c4c5bacec5473f9..ca08ee39bd2a3c42d4681ea8824937acd7d58bfc 100644
--- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs
+++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs
@@ -2,9 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
namespace System.Runtime.CompilerServices
{
+ [SupportedOSPlatform("windows")]
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
public sealed partial class IDispatchConstantAttribute : CustomConstantAttribute
{
diff --git a/src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/PasswordDeriveBytes.cs b/src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/PasswordDeriveBytes.cs
index 4b5e73dc340ebc037653890c159dbfc677ad8e3c..ee79a76f05cdf9d2ba6c9679687df28ea1669b5c 100644
--- a/src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/PasswordDeriveBytes.cs
+++ b/src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/PasswordDeriveBytes.cs
@@ -25,6 +25,7 @@ public partial class PasswordDeriveBytes : DeriveBytes
private HashAlgorithm? _hash;
private readonly CspParameters? _cspParams;
+#pragma warning disable CA1416 // Validate platform compatibility, CspParametersis is windows only type, we might want to annotate this constructors windows only, suppressing for now
public PasswordDeriveBytes(string strPassword, byte[]? rgbSalt) : this(strPassword, rgbSalt, new CspParameters()) { }
public PasswordDeriveBytes(byte[] password, byte[]? salt) : this(password, salt, new CspParameters()) { }
@@ -34,6 +35,7 @@ public partial class PasswordDeriveBytes : DeriveBytes
public PasswordDeriveBytes(byte[] password, byte[]? salt, string hashName, int iterations) :
this(password, salt, hashName, iterations, new CspParameters()) { }
+#pragma warning restore CA1416
public PasswordDeriveBytes(string strPassword, byte[]? rgbSalt, CspParameters? cspParams) :
this(strPassword, rgbSalt, "SHA1", 100, cspParams) { }
diff --git a/src/libraries/System.ServiceModel.Syndication/src/System.ServiceModel.Syndication.csproj b/src/libraries/System.ServiceModel.Syndication/src/System.ServiceModel.Syndication.csproj
index 302d11eb2fc33d9f81b0bee65c8af86462ddcb97..73ebfaba0e98bfebd40c60ef17313ac2e953e9cc 100644
--- a/src/libraries/System.ServiceModel.Syndication/src/System.ServiceModel.Syndication.csproj
+++ b/src/libraries/System.ServiceModel.Syndication/src/System.ServiceModel.Syndication.csproj
@@ -2,6 +2,7 @@
$(NetCoreAppCurrent);netstandard2.0;net461-Windows_NT
true
+ true
diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj b/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj
index 504f90a32415e01c10a24f6f24d6840745e961d6..4f2826bd93ee55932227c4980d98aefe90373d45 100644
--- a/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj
+++ b/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj
@@ -4,6 +4,7 @@
enable
$(NetCoreAppCurrent);$(NetCoreAppCurrent)-Windows_NT;netstandard2.0;netcoreapp2.0-Windows_NT;netstandard2.0-Windows_NT;net461-Windows_NT
true
+ true