From bf001d02af7761ea20fe3e194541abe7528dfba0 Mon Sep 17 00:00:00 2001
From: Tanner Gooding <tagoo@outlook.com>
Date: Wed, 14 Jul 2021 12:33:57 -0700
Subject: [PATCH 1/6] Add a System.Runtime.Experimental package so users can
 still use the generic math preview

This reverts commit f6eb259db626d563c15ba340feb6f440d1e1c8ee.
---
 src/coreclr/clr.featuredefines.props          |   2 +-
 .../Directory.Build.props                     |   6 +
 .../System.Runtime.Experimental/NuGet.config  |  12 ++
 .../System.Runtime.Experimental.sln           | 105 ++++++++++++++++++
 .../ref/System.Runtime.Experimental.csproj    |  21 ++++
 .../src/MatchingRefApiCompatBaseline.txt      |  26 +++++
 .../src/System.Runtime.Experimental.csproj    |  19 ++++
 .../System.Runtime.Experimental.Tests.csproj  |  47 ++++++++
 .../src/MatchingRefApiCompatBaseline.txt      |  23 +++-
 .../System.Private.CoreLib.csproj             |   2 +-
 10 files changed, 260 insertions(+), 3 deletions(-)
 create mode 100644 src/libraries/System.Runtime.Experimental/Directory.Build.props
 create mode 100644 src/libraries/System.Runtime.Experimental/NuGet.config
 create mode 100644 src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
 create mode 100644 src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
 create mode 100644 src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt
 create mode 100644 src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj
 create mode 100644 src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj

diff --git a/src/coreclr/clr.featuredefines.props b/src/coreclr/clr.featuredefines.props
index 184e885470f636..08fca8de6dd644 100644
--- a/src/coreclr/clr.featuredefines.props
+++ b/src/coreclr/clr.featuredefines.props
@@ -9,7 +9,7 @@
         <FeaturePerfTracing>true</FeaturePerfTracing>
         <FeatureTypeEquivalence>true</FeatureTypeEquivalence>
         <FeatureBasicFreeze>true</FeatureBasicFreeze>
-        <FeatureGenericMath>false</FeatureGenericMath>
+        <FeatureGenericMath>true</FeatureGenericMath>
         <ProfilingSupportedBuild>true</ProfilingSupportedBuild>
     </PropertyGroup>
 
diff --git a/src/libraries/System.Runtime.Experimental/Directory.Build.props b/src/libraries/System.Runtime.Experimental/Directory.Build.props
new file mode 100644
index 00000000000000..63f02a0f817ef2
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/Directory.Build.props
@@ -0,0 +1,6 @@
+﻿<Project>
+  <Import Project="..\Directory.Build.props" />
+  <PropertyGroup>
+    <StrongNameKeyId>Microsoft</StrongNameKeyId>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/libraries/System.Runtime.Experimental/NuGet.config b/src/libraries/System.Runtime.Experimental/NuGet.config
new file mode 100644
index 00000000000000..a66b7f9b013241
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/NuGet.config
@@ -0,0 +1,12 @@
+<configuration>
+  <!-- This disables restore in VS for projects that target platform specific target frameworks older than net5.0. -->
+  <packageRestore>
+    <!-- The 'automatic' key is set to True when the "Automatically check for missing packages during
+         build in Visual Studio" checkbox is set. Clearing the box sets this to False and disables
+         automatic restore. -->
+    <add key="automatic" value="False" />
+    <!-- The 'enabled' key is True when the "Allow NuGet to download missing packages" checkbox is set.
+         Clearing the box sets this to False, disabling command-line, automatic, and MSBuild-integrated restore. -->
+    <add key="enabled" value="False" />
+  </packageRestore>
+</configuration>
\ No newline at end of file
diff --git a/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln b/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
new file mode 100644
index 00000000000000..1e50768832ff3c
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
@@ -0,0 +1,105 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental", "ref\System.Runtime.Experimental.csproj", "{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental", "src\System.Runtime.Experimental.csproj", "{A83A8520-F5E2-49B4-83BC-0F82A412951D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental.Tests", "tests\System.Runtime.Experimental.Tests.csproj", "{4EE36055-AD7C-4779-B3F6-08687960DCC3}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C7032EBC-8AB7-4BE6-9D95-B420F058FAAF}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BDCC9986-D51F-48D9-9650-388E172CD91E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F4F10B6C-21C0-4C9D-8909-76FC52145120}"
+EndProject
+Global
+	GlobalSection(NestedProjects) = preSolution
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9} = {C7032EBC-8AB7-4BE6-9D95-B420F058FAAF}
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {F4F10B6C-21C0-4C9D-8909-76FC52145120}
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D} = {C7032EBC-8AB7-4BE6-9D95-B420F058FAAF}
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3} = {BDCC9986-D51F-48D9-9650-388E172CD91E}
+	EndGlobalSection
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+		Checked|Any CPU = Checked|Any CPU
+		Checked|x64 = Checked|x64
+		Checked|x86 = Checked|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.ActiveCfg = Debug|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.Build.0 = Debug|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x64.ActiveCfg = Debug|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x64.Build.0 = Debug|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x86.ActiveCfg = Debug|x86
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x86.Build.0 = Debug|x86
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|Any CPU.ActiveCfg = Release|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|Any CPU.Build.0 = Release|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x64.ActiveCfg = Release|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x64.Build.0 = Release|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.ActiveCfg = Release|x86
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.Build.0 = Release|x86
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.ActiveCfg = Checked|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.Build.0 = Checked|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.ActiveCfg = Checked|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.Build.0 = Checked|x64
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.ActiveCfg = Checked|x86
+		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.Build.0 = Checked|x86
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x64.Build.0 = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x86.Build.0 = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x64.ActiveCfg = Release|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x64.Build.0 = Release|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.ActiveCfg = Release|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.Build.0 = Release|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU
+		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU
+        {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x64.Build.0 = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x86.Build.0 = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x64.ActiveCfg = Release|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x64.Build.0 = Release|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.ActiveCfg = Release|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.Build.0 = Release|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.ActiveCfg = Debug|Any CPU
+		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.ActiveCfg = Debug|Any CPU
+        {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.Build.0 = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x86.Build.0 = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x64.ActiveCfg = Release|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x64.Build.0 = Release|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.ActiveCfg = Release|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.Build.0 = Release|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.ActiveCfg = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.ActiveCfg = Debug|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {19706846-1F47-42ED-B649-B0982EE96E6B}
+	EndGlobalSection
+EndGlobal
diff --git a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
new file mode 100644
index 00000000000000..39a199fe033e91
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
@@ -0,0 +1,21 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <AssemblyName>System.Runtime</AssemblyName>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <FeatureGenericMath>true</FeatureGenericMath>
+    <!-- It is a core assembly because it defines System.Object so we need to pass RuntimeMetadataVersion to the compiler -->
+    <RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
+    <!-- disable warnings about obsolete APIs,
+        Remove warning disable when nullable attributes are respected,
+        Type has no accessible constructors which use only CLS-compliant types -->
+    <NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
+    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+    <Nullable>enable</Nullable>
+  </PropertyGroup>
+  <PropertyGroup>
+    <DefineConstants Condition="'$(FeatureGenericMath)' == 'true'">$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.cs" />
+  </ItemGroup>
+</Project>
diff --git a/src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt
new file mode 100644
index 00000000000000..f37135db83a419
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt
@@ -0,0 +1,26 @@
+Compat issues with assembly System.Runtime:
+MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.SetData(System.String, System.Object)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected void System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Diagnostics.DebugProvider System.Diagnostics.Debug.SetProvider(System.Diagnostics.DebugProvider)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Runtime.Serialization.DeserializationToken System.Runtime.Serialization.SerializationInfo.StartDeserialization()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
+# These are now virtual in the implementation, which should be ok.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
+# C# generates backing fields for fixed buffers as public.
+TypesMustExist : Type 'System.IO.Enumeration.FileSystemEntry.<_fileNameBuffer>e__FixedBuffer' does not exist in the reference but it does exist in the implementation.
diff --git a/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj b/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj
new file mode 100644
index 00000000000000..ba5cfc0ad0bd7a
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj
@@ -0,0 +1,19 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <AssemblyName>System.Runtime</AssemblyName>
+    <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+    <Nullable>enable</Nullable>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->
+    <GenFacadesOmitType Include="System.Void" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.Typeforwards.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="$(CoreLibProject)" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Private.Uri\src\System.Private.Uri.csproj" />
+  </ItemGroup>
+</Project>
diff --git a/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj b/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
new file mode 100644
index 00000000000000..55744297d2c495
--- /dev/null
+++ b/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
@@ -0,0 +1,47 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <AssemblyName>System.Runtime.Tests</AssemblyName>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <FeatureGenericMath>true</FeatureGenericMath>
+    <NoWarn>$(NoWarn),1718,SYSLIB0013</NoWarn>
+    <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
+    <Nullable>disable</Nullable>
+    <!-- Disable nullability public only feature for NullabilityInfoContextTests -->
+    <Features>$(Features.Replace('nullablePublicOnly', '')</Features>
+  </PropertyGroup>
+  <PropertyGroup>
+    <DefineConstants Condition="'$(FeatureGenericMath)' == 'true'">$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\ByteTests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\CharTests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int16Tests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int32Tests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int64Tests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\IntPtrTests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\SByteTests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt16Tests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt32Tests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt64Tests.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UIntPtrTests.cs" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(FeatureGenericMath)' == 'true'">
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\ByteTests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\CharTests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\GenericMathHelpers.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int16Tests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int32Tests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int64Tests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\IntPtrTests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\SByteTests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt16Tests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt32Tests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt64Tests.GenericMath.cs" />
+    <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UIntPtrTests.GenericMath.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="$(CommonTestPath)TestUtilities.Unicode\TestUtilities.Unicode.csproj" />
+  </ItemGroup>
+</Project>
diff --git a/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
index cbe8cabdbb2956..340fd11ced640a 100644
--- a/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
+++ b/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
@@ -24,4 +24,25 @@ CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInf
 CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
 # C# generates backing fields for fixed buffers as public.
 TypesMustExist : Type 'System.IO.Enumeration.FileSystemEntry.<_fileNameBuffer>e__FixedBuffer' does not exist in the reference but it does exist in the implementation.
-
+# Experimental generic math feature
+CannotRemoveBaseTypeOrInterface : Type 'System.Byte' does not implement interface 'System.IBinaryInteger<System.Byte>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Char' does not implement interface 'System.IBinaryInteger<System.Char>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.DateOnly' does not implement interface 'System.IComparisonOperators<System.DateOnly, System.DateOnly>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.DateTime' does not implement interface 'System.IAdditionOperators<System.DateTime, System.TimeSpan, System.DateTime>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.DateTimeOffset' does not implement interface 'System.IAdditionOperators<System.DateTimeOffset, System.TimeSpan, System.DateTimeOffset>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Decimal' does not implement interface 'System.IMinMaxValue<System.Decimal>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Double' does not implement interface 'System.IBinaryFloatingPoint<System.Double>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Guid' does not implement interface 'System.IComparisonOperators<System.Guid, System.Guid>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Half' does not implement interface 'System.IBinaryFloatingPoint<System.Half>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Int16' does not implement interface 'System.IBinaryInteger<System.Int16>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Int32' does not implement interface 'System.IBinaryInteger<System.Int32>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Int64' does not implement interface 'System.IBinaryInteger<System.Int64>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.IntPtr' does not implement interface 'System.IBinaryInteger<System.IntPtr>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.SByte' does not implement interface 'System.IBinaryInteger<System.SByte>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.Single' does not implement interface 'System.IBinaryFloatingPoint<System.Single>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.TimeOnly' does not implement interface 'System.IComparisonOperators<System.TimeOnly, System.TimeOnly>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.TimeSpan' does not implement interface 'System.IAdditionOperators<System.TimeSpan, System.TimeSpan, System.TimeSpan>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.UInt16' does not implement interface 'System.IBinaryInteger<System.UInt16>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.UInt32' does not implement interface 'System.IBinaryInteger<System.UInt32>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.UInt64' does not implement interface 'System.IBinaryInteger<System.UInt64>' in the reference but it does in the implementation.
+CannotRemoveBaseTypeOrInterface : Type 'System.UIntPtr' does not implement interface 'System.IBinaryInteger<System.UIntPtr>' in the reference but it does in the implementation.
diff --git a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
index 8488d916e6df03..4edae171504d1c 100644
--- a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -109,7 +109,7 @@
     <FeatureMono>true</FeatureMono>
     <FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
     <FeatureManagedEtw>true</FeatureManagedEtw>
-    <FeatureGenericMath>false</FeatureGenericMath>
+    <FeatureGenericMath>true</FeatureGenericMath>
     <FeaturePortableTimer Condition="'$(TargetsBrowser)' != 'true'">true</FeaturePortableTimer>
     <FeaturePortableThreadPool Condition="'$(TargetsBrowser)' != 'true'">true</FeaturePortableThreadPool>
     <FeaturePerfTracing Condition="'$(TargetsBrowser)' != 'true'">true</FeaturePerfTracing>

From 5f70f4aaeb72f18d196841585f9f35cac97439ac Mon Sep 17 00:00:00 2001
From: Tanner Gooding <tagoo@outlook.com>
Date: Wed, 14 Jul 2021 14:22:14 -0700
Subject: [PATCH 2/6] Simplify S.R.Experimental so it only produces a ref and
 its build version is 100 higher

---
 .../Directory.Build.props                     |  4 ++-
 .../System.Runtime.Experimental.sln           | 22 +---------------
 .../ref/System.Runtime.Experimental.csproj    | 12 +++++++++
 .../src/MatchingRefApiCompatBaseline.txt      | 26 -------------------
 .../src/System.Runtime.Experimental.csproj    | 19 --------------
 .../src/MatchingRefApiCompatBaseline.txt      | 22 ----------------
 .../System.Runtime/src/System.Runtime.csproj  |  3 ++-
 7 files changed, 18 insertions(+), 90 deletions(-)
 delete mode 100644 src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt
 delete mode 100644 src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj

diff --git a/src/libraries/System.Runtime.Experimental/Directory.Build.props b/src/libraries/System.Runtime.Experimental/Directory.Build.props
index 63f02a0f817ef2..949be36e557243 100644
--- a/src/libraries/System.Runtime.Experimental/Directory.Build.props
+++ b/src/libraries/System.Runtime.Experimental/Directory.Build.props
@@ -1,6 +1,8 @@
 ﻿<Project>
   <Import Project="..\Directory.Build.props" />
   <PropertyGroup>
+    <IsNETCoreAppRef>false</IsNETCoreAppRef>
+    <IsNETCoreAppSrc>false</IsNETCoreAppSrc>
     <StrongNameKeyId>Microsoft</StrongNameKeyId>
   </PropertyGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln b/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
index 1e50768832ff3c..488f21fdfd347f 100644
--- a/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
+++ b/src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
@@ -3,12 +3,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", ".
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental", "ref\System.Runtime.Experimental.csproj", "{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental", "src\System.Runtime.Experimental.csproj", "{A83A8520-F5E2-49B4-83BC-0F82A412951D}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental.Tests", "tests\System.Runtime.Experimental.Tests.csproj", "{4EE36055-AD7C-4779-B3F6-08687960DCC3}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C7032EBC-8AB7-4BE6-9D95-B420F058FAAF}"
-EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BDCC9986-D51F-48D9-9650-388E172CD91E}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F4F10B6C-21C0-4C9D-8909-76FC52145120}"
@@ -17,7 +13,6 @@ Global
 	GlobalSection(NestedProjects) = preSolution
 		{71AB8240-F179-4B21-A8BE-8BE6CD774ED9} = {C7032EBC-8AB7-4BE6-9D95-B420F058FAAF}
 		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {F4F10B6C-21C0-4C9D-8909-76FC52145120}
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D} = {C7032EBC-8AB7-4BE6-9D95-B420F058FAAF}
 		{4EE36055-AD7C-4779-B3F6-08687960DCC3} = {BDCC9986-D51F-48D9-9650-388E172CD91E}
 	EndGlobalSection
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -65,22 +60,7 @@ Global
 		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
 		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU
 		{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU
-        {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x64.Build.0 = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Debug|x86.Build.0 = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x64.ActiveCfg = Release|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x64.Build.0 = Release|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.ActiveCfg = Release|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Release|x86.Build.0 = Release|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x64.ActiveCfg = Debug|Any CPU
-		{A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|x86.ActiveCfg = Debug|Any CPU
-        {4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.ActiveCfg = Debug|Any CPU
 		{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.Build.0 = Debug|Any CPU
diff --git a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
index 39a199fe033e91..50c4da0750cae0 100644
--- a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
+++ b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
@@ -18,4 +18,16 @@
   <ItemGroup>
     <Compile Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.cs" />
   </ItemGroup>
+  <Target Name="_ExperimentalUpdateFileVersion"
+          AfterTargets="_InitializeAssemblyVersion">
+    <PropertyGroup>
+      <_FileVersionMaj>$(FileVersion.Split('.')[0])</_FileVersionMaj>
+      <_FileVersionMin>$(FileVersion.Split('.')[1])</_FileVersionMin>
+      <_FileVersionBld>$(FileVersion.Split('.')[2])</_FileVersionBld>
+      <_FileVersionRev>$(FileVersion.Split('.')[3])</_FileVersionRev>
+    </PropertyGroup>
+    <CreateProperty Value="$(_FileVersionMaj).$(_FileVersionMin).$([MSBuild]::Add($(_FileVersionBld), 100)).$(_FileVersionRev)">
+      <Output TaskParameter="Value" PropertyName="FileVersion" />
+    </CreateProperty>
+  </Target>
 </Project>
diff --git a/src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt
deleted file mode 100644
index f37135db83a419..00000000000000
--- a/src/libraries/System.Runtime.Experimental/src/MatchingRefApiCompatBaseline.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Compat issues with assembly System.Runtime:
-MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.AppContext.SetData(System.String, System.Object)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected void System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Diagnostics.DebugProvider System.Diagnostics.Debug.SetProvider(System.Diagnostics.DebugProvider)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public System.Runtime.Serialization.DeserializationToken System.Runtime.Serialization.SerializationInfo.StartDeserialization()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
-# These are now virtual in the implementation, which should be ok.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
-CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
-# C# generates backing fields for fixed buffers as public.
-TypesMustExist : Type 'System.IO.Enumeration.FileSystemEntry.<_fileNameBuffer>e__FixedBuffer' does not exist in the reference but it does exist in the implementation.
diff --git a/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj b/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj
deleted file mode 100644
index ba5cfc0ad0bd7a..00000000000000
--- a/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.csproj
+++ /dev/null
@@ -1,19 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <AssemblyName>System.Runtime</AssemblyName>
-    <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
-    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <Nullable>enable</Nullable>
-  </PropertyGroup>
-  <ItemGroup>
-    <!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->
-    <GenFacadesOmitType Include="System.Void" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.Typeforwards.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CoreLibProject)" />
-    <ProjectReference Include="$(LibrariesProjectRoot)System.Private.Uri\src\System.Private.Uri.csproj" />
-  </ItemGroup>
-</Project>
diff --git a/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
index 340fd11ced640a..f37135db83a419 100644
--- a/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
+++ b/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
@@ -24,25 +24,3 @@ CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInf
 CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
 # C# generates backing fields for fixed buffers as public.
 TypesMustExist : Type 'System.IO.Enumeration.FileSystemEntry.<_fileNameBuffer>e__FixedBuffer' does not exist in the reference but it does exist in the implementation.
-# Experimental generic math feature
-CannotRemoveBaseTypeOrInterface : Type 'System.Byte' does not implement interface 'System.IBinaryInteger<System.Byte>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Char' does not implement interface 'System.IBinaryInteger<System.Char>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.DateOnly' does not implement interface 'System.IComparisonOperators<System.DateOnly, System.DateOnly>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.DateTime' does not implement interface 'System.IAdditionOperators<System.DateTime, System.TimeSpan, System.DateTime>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.DateTimeOffset' does not implement interface 'System.IAdditionOperators<System.DateTimeOffset, System.TimeSpan, System.DateTimeOffset>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Decimal' does not implement interface 'System.IMinMaxValue<System.Decimal>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Double' does not implement interface 'System.IBinaryFloatingPoint<System.Double>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Guid' does not implement interface 'System.IComparisonOperators<System.Guid, System.Guid>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Half' does not implement interface 'System.IBinaryFloatingPoint<System.Half>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Int16' does not implement interface 'System.IBinaryInteger<System.Int16>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Int32' does not implement interface 'System.IBinaryInteger<System.Int32>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Int64' does not implement interface 'System.IBinaryInteger<System.Int64>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.IntPtr' does not implement interface 'System.IBinaryInteger<System.IntPtr>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.SByte' does not implement interface 'System.IBinaryInteger<System.SByte>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Single' does not implement interface 'System.IBinaryFloatingPoint<System.Single>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.TimeOnly' does not implement interface 'System.IComparisonOperators<System.TimeOnly, System.TimeOnly>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.TimeSpan' does not implement interface 'System.IAdditionOperators<System.TimeSpan, System.TimeSpan, System.TimeSpan>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.UInt16' does not implement interface 'System.IBinaryInteger<System.UInt16>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.UInt32' does not implement interface 'System.IBinaryInteger<System.UInt32>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.UInt64' does not implement interface 'System.IBinaryInteger<System.UInt64>' in the reference but it does in the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.UIntPtr' does not implement interface 'System.IBinaryInteger<System.UIntPtr>' in the reference but it does in the implementation.
diff --git a/src/libraries/System.Runtime/src/System.Runtime.csproj b/src/libraries/System.Runtime/src/System.Runtime.csproj
index 6e3a18228e7e6a..eedb651c3bad58 100644
--- a/src/libraries/System.Runtime/src/System.Runtime.csproj
+++ b/src/libraries/System.Runtime/src/System.Runtime.csproj
@@ -1,11 +1,12 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
+    <ContractProject>$(LibrariesProjectRoot)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj</ContractProject>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
     <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
-    <!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->  
+    <!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->
     <GenFacadesOmitType Include="System.Void" />
   </ItemGroup>
   <ItemGroup>

From 45471303da31430ea410178f6a68131af3391a17 Mon Sep 17 00:00:00 2001
From: Tanner Gooding <tagoo@outlook.com>
Date: Wed, 14 Jul 2021 17:13:54 -0700
Subject: [PATCH 3/6] Ensure a nuget package is being produced and resolve PR
 feedback

---
 src/libraries/Directory.Build.targets          | 18 +++++++++++-------
 .../Directory.Build.props                      |  3 +--
 .../ref/System.Runtime.Experimental.csproj     | 15 +++++++++------
 .../src/MatchingRefApiCompatBaseline.txt       |  1 +
 .../System.Runtime/src/System.Runtime.csproj   |  1 +
 src/libraries/libraries-packages.proj          |  1 +
 6 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index dd17dace8e4ba0..60e98a9dd70fad 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -24,7 +24,7 @@
     <NativeBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'native', '$(NetCoreAppCurrentBuildSettings)'))</NativeBinDir>
     <NetCoreAppCurrentTestHostPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(NetCoreAppCurrentBuildSettings)'))</NetCoreAppCurrentTestHostPath>
     <NetCoreAppCurrentTestHostSharedFrameworkPath>$([MSBuild]::NormalizeDirectory('$(NetCoreAppCurrentTestHostPath)', 'shared', '$(MicrosoftNetCoreAppFrameworkName)', '$(ProductVersion)'))</NetCoreAppCurrentTestHostSharedFrameworkPath>
-    
+
     <SymbolPackageOutputPath>$(PackageOutputPath)</SymbolPackageOutputPath>
 
     <NoWarn Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == '.NETStandard' or ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '3.0')))">$(NoWarn);nullable</NoWarn>
@@ -282,10 +282,14 @@
   </Choose>
 
   <Target Name="LibIntellisenseDocs" Condition="'$(IncludeBuildOutput)' == 'true'">
+   <PropertyGroup>
+     <_intellisenseRootFolder>$(BuildOutputTargetFolder)</_intellisenseRootFolder>
+     <_intellisenseRootFolder Condition="'$(_intellisenseRootFolder)' == ''">lib</_intellisenseRootFolder>
+   </PropertyGroup>
    <ItemGroup>
       <TfmSpecificPackageFile Include="$(XmlDocFileRoot)1033\$(TargetName).xml"
                               Condition="Exists('$(XmlDocFileRoot)1033\$(TargetName).xml')"
-                              PackagePath="lib/$(TargetFramework)" />
+                              PackagePath="$(_intellisenseRootFolder)/$(TargetFramework)" />
     </ItemGroup>
   </Target>
 
@@ -294,8 +298,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <!-- Ensure AnalyzerReference items are restored and built 
-         The target framework of Analyzers has no relationship to that of the refrencing project, 
+    <!-- Ensure AnalyzerReference items are restored and built
+         The target framework of Analyzers has no relationship to that of the refrencing project,
          so we don't apply TargetFramework filters nor do we pass in TargetFramework.
          When BuildProjectReferences=false we make sure to set BuildReference=false to make
          sure not to try to call GetTargetPath in the outerbuild of the analyzer project. -->
@@ -313,9 +317,9 @@
 
     <ItemGroup>
       <Content Include="@(_AnalyzerFile)" Pack="True" Condition="!%(_AnalyzerFile.IsSymbol)" />
-      <!-- Symbols don't honor PackagePath.  By default they are placed in lib/%(TargetFramework).           
+      <!-- Symbols don't honor PackagePath.  By default they are placed in lib/%(TargetFramework).
            Pack does honor TargetPath and does Path.Combine("lib/%(TargetFramework)", "%(TargetPath)"),
-           so a rooted path value for TargetPath will override lib. 
+           so a rooted path value for TargetPath will override lib.
            https://github.com/NuGet/Home/issues/10860 -->
       <_TargetPathsToSymbols Include="@(_AnalyzerFile)" TargetPath="/%(_AnalyzerFile.PackagePath)" Condition="%(_AnalyzerFile.IsSymbol)" />
     </ItemGroup>
@@ -331,7 +335,7 @@
       <_AnalyzerPackFile Include="@(_TargetPathsToSymbols)" IsSymbol="true" />
       <_AnalyzerPackFile PackagePath="$(_analyzerPath)/%(TargetPath)" />
     </ItemGroup>
-    <Error Condition="'%(_AnalyzerPackFile.TargetFramework)' != 'netstandard2.0'" 
+    <Error Condition="'%(_AnalyzerPackFile.TargetFramework)' != 'netstandard2.0'"
            Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" />
   </Target>
 
diff --git a/src/libraries/System.Runtime.Experimental/Directory.Build.props b/src/libraries/System.Runtime.Experimental/Directory.Build.props
index 949be36e557243..f3de1649b566f5 100644
--- a/src/libraries/System.Runtime.Experimental/Directory.Build.props
+++ b/src/libraries/System.Runtime.Experimental/Directory.Build.props
@@ -1,8 +1,7 @@
 ﻿<Project>
   <Import Project="..\Directory.Build.props" />
   <PropertyGroup>
-    <IsNETCoreAppRef>false</IsNETCoreAppRef>
-    <IsNETCoreAppSrc>false</IsNETCoreAppSrc>
+    <EnableBinPlacing>false</EnableBinPlacing>
     <StrongNameKeyId>Microsoft</StrongNameKeyId>
   </PropertyGroup>
 </Project>
diff --git a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
index 50c4da0750cae0..4c6ae1a740fe26 100644
--- a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
+++ b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
@@ -8,12 +8,17 @@
     <!-- disable warnings about obsolete APIs,
         Remove warning disable when nullable attributes are respected,
         Type has no accessible constructors which use only CLS-compliant types -->
-    <NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
+    <NoWarn>$(NoWarn);0809;0618;CS8614;CS3015;NU5131</NoWarn>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
     <Nullable>enable</Nullable>
   </PropertyGroup>
-  <PropertyGroup>
-    <DefineConstants Condition="'$(FeatureGenericMath)' == 'true'">$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
+  <PropertyGroup Condition="'$(FeatureGenericMath)' == 'true'">
+    <!-- Place this assembly in the nuget ref folder -->
+    <BuildOutputTargetFolder>ref</BuildOutputTargetFolder>
+    <DefineConstants>$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
+    <IsPackable>true</IsPackable>
+    <PackageDescription>Exposes new experimental APIs from System.Runtime</PackageDescription>
+    <PackageId>$(MSBuildProjectName)</PackageId>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.cs" />
@@ -25,9 +30,7 @@
       <_FileVersionMin>$(FileVersion.Split('.')[1])</_FileVersionMin>
       <_FileVersionBld>$(FileVersion.Split('.')[2])</_FileVersionBld>
       <_FileVersionRev>$(FileVersion.Split('.')[3])</_FileVersionRev>
+      <FileVersion>$(_FileVersionMaj).$(_FileVersionMin).$([MSBuild]::Add($(_FileVersionBld), 100)).$(_FileVersionRev)</FileVersion>
     </PropertyGroup>
-    <CreateProperty Value="$(_FileVersionMaj).$(_FileVersionMin).$([MSBuild]::Add($(_FileVersionBld), 100)).$(_FileVersionRev)">
-      <Output TaskParameter="Value" PropertyName="FileVersion" />
-    </CreateProperty>
   </Target>
 </Project>
diff --git a/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
index f37135db83a419..cbe8cabdbb2956 100644
--- a/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
+++ b/src/libraries/System.Runtime/src/MatchingRefApiCompatBaseline.txt
@@ -24,3 +24,4 @@ CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInf
 CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
 # C# generates backing fields for fixed buffers as public.
 TypesMustExist : Type 'System.IO.Enumeration.FileSystemEntry.<_fileNameBuffer>e__FixedBuffer' does not exist in the reference but it does exist in the implementation.
+
diff --git a/src/libraries/System.Runtime/src/System.Runtime.csproj b/src/libraries/System.Runtime/src/System.Runtime.csproj
index eedb651c3bad58..38cdb0e8526dc3 100644
--- a/src/libraries/System.Runtime/src/System.Runtime.csproj
+++ b/src/libraries/System.Runtime/src/System.Runtime.csproj
@@ -1,5 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
+    <!-- Pull type forwards from the experimental ref assembly so we only need to maintain a single src project -->
     <ContractProject>$(LibrariesProjectRoot)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj</ContractProject>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
diff --git a/src/libraries/libraries-packages.proj b/src/libraries/libraries-packages.proj
index 383dd088e127c0..d47cd90675e543 100644
--- a/src/libraries/libraries-packages.proj
+++ b/src/libraries/libraries-packages.proj
@@ -3,6 +3,7 @@
   <ItemGroup>
     <PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />
 
+    <ProjectReference Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj" />
     <ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" />
     <ProjectReference Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
                       Condition="'$(BuildAllConfigurations)' == 'true'"

From ae5479bc8eadebf0c9eadcefe02f506743c778f7 Mon Sep 17 00:00:00 2001
From: Tanner Gooding <tagoo@outlook.com>
Date: Thu, 15 Jul 2021 09:04:46 -0700
Subject: [PATCH 4/6] Update
 src/libraries/System.Runtime.Experimental/Directory.Build.props

---
 .../System.Runtime.Experimental/Directory.Build.props          | 1 +
 src/libraries/libraries-packages.proj                          | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libraries/System.Runtime.Experimental/Directory.Build.props b/src/libraries/System.Runtime.Experimental/Directory.Build.props
index f3de1649b566f5..64242a92fce4ff 100644
--- a/src/libraries/System.Runtime.Experimental/Directory.Build.props
+++ b/src/libraries/System.Runtime.Experimental/Directory.Build.props
@@ -1,6 +1,7 @@
 ﻿<Project>
   <Import Project="..\Directory.Build.props" />
   <PropertyGroup>
+    <!-- Disable all binplacing since this assembly will clash with the real System.Runtime -->
     <EnableBinPlacing>false</EnableBinPlacing>
     <StrongNameKeyId>Microsoft</StrongNameKeyId>
   </PropertyGroup>
diff --git a/src/libraries/libraries-packages.proj b/src/libraries/libraries-packages.proj
index d47cd90675e543..f67803e79972bc 100644
--- a/src/libraries/libraries-packages.proj
+++ b/src/libraries/libraries-packages.proj
@@ -3,7 +3,8 @@
   <ItemGroup>
     <PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />
 
-    <ProjectReference Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj" />
+    <ProjectReference Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj"
+                      Condition="'$(BuildAllConfigurations)' == 'true'" />
     <ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" />
     <ProjectReference Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
                       Condition="'$(BuildAllConfigurations)' == 'true'"

From a91ea5c94579e0c4ca93570bb4bb241288c00c3e Mon Sep 17 00:00:00 2001
From: Tanner Gooding <tagoo@outlook.com>
Date: Wed, 14 Jul 2021 22:59:51 -0700
Subject: [PATCH 5/6] Add a reference to System.Runtime.Experimental so mono
 can build

---
 .../tests/System.Runtime.Experimental.Tests.csproj               | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj b/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
index 55744297d2c495..b78447f47a02bd 100644
--- a/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
+++ b/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
@@ -42,6 +42,7 @@
     <Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UIntPtrTests.GenericMath.cs" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj" />
     <ProjectReference Include="$(CommonTestPath)TestUtilities.Unicode\TestUtilities.Unicode.csproj" />
   </ItemGroup>
 </Project>

From 0ab5f2d188ab8348210fb02831d0bef39adcc1a3 Mon Sep 17 00:00:00 2001
From: Tanner Gooding <tagoo@outlook.com>
Date: Thu, 15 Jul 2021 12:51:00 -0700
Subject: [PATCH 6/6] Disable System.Runtime.Experimental.Tests on WASM AOT

---
 .../tests/System.Runtime.Experimental.Tests.csproj         | 1 -
 src/libraries/tests.proj                                   | 7 +++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj b/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
index b78447f47a02bd..b1cd60dc72330d 100644
--- a/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
+++ b/src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <AssemblyName>System.Runtime.Tests</AssemblyName>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <FeatureGenericMath>true</FeatureGenericMath>
     <NoWarn>$(NoWarn),1718,SYSLIB0013</NoWarn>
diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 4884a9416d9fe9..fbc717a1488464 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -205,7 +205,7 @@
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj" />
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj" />
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj" />
-  
+
     <!-- App Crash https://github.com/dotnet/runtime/issues/53624 -->
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj" />
   </ItemGroup>
@@ -228,7 +228,7 @@
     <!-- Crashes on CI but passes locally https://github.com/dotnet/runtime/issues/52615 -->
     <ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\Interpreter\iOS.Simulator.Interpreter.Test.csproj" />
     <ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\InvariantCultureOnlyMode\iOS.Simulator.InvariantCultureOnlyMode.Test.csproj" />
-  
+
     <!-- No current support for AOT+LLVM on catalyst, so skip functional test -->
     <ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\AOT-LLVM\**\*.Test.csproj" />
   </ItemGroup>
@@ -278,6 +278,9 @@
 
     <!-- https://github.com/dotnet/runtime/issues/38433 -->
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.DiagnosticSource/tests/TestWithConfigSwitches/System.Diagnostics.DiagnosticSource.Switches.Tests.csproj" />
+
+    <!-- Issue: https://github.com/dotnet/runtime/issues/55767 -->
+    <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\tests\System.Runtime.Experimental.Tests.csproj" />
   </ItemGroup>
 
   <ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true'">
