From 0836ae16e1baa74d58011c1c9e5bda7d8cb2e330 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 17 Nov 2021 13:57:35 -0800 Subject: [PATCH 1/4] Introduce non-shipped System.Runtime.Internal assembly Introduce non-shipped System.Runtime.Internal assembly for internal test usage only and remove support from our test system. Any internal APIs (primarily in the hosting space) that are needed for testing that we don't want to expose publically should be exposed via System.Runtime.Internal for our testing infrastructure to reference. --- .../Runtime/InteropServices/ComActivator.cs | 3 +- .../Directory.Build.props | 6 ++ .../System.Runtime.Internal/README.md | 3 + .../System.Runtime.Internal.sln | 33 ++++++++++ .../ref/System.Runtime.Internal.cs | 54 ++++++++++++++++ .../ref/System.Runtime.Internal.csproj | 14 +++++ .../src/MatchingRefApiCompatBaseline.txt | 4 ++ .../src/Resources/Strings.resx | 63 +++++++++++++++++++ .../src/System.Runtime.Internal.csproj | 13 ++++ .../System.Runtime.Experimental.Tests.csproj | 55 ++++++++++++++++ src/tests/Common/override.targets | 28 --------- src/tests/Directory.Build.targets | 12 +--- .../Interop/COM/Activator/Activator.csproj | 2 - .../ActivatorBuiltInComDisabled.csproj | 2 - src/tests/Interop/COM/Activator/Program.cs | 14 ++++- src/tests/Interop/Directory.Build.targets | 11 +--- src/tests/Interop/ICastable/Castable.cs | 14 ++--- src/tests/Interop/ICastable/Castable.csproj | 4 +- .../LoadIjwFromModuleHandle.cs | 2 - .../LoadIjwFromModuleHandle.csproj | 2 - 20 files changed, 269 insertions(+), 70 deletions(-) create mode 100644 src/libraries/System.Runtime.Internal/Directory.Build.props create mode 100644 src/libraries/System.Runtime.Internal/README.md create mode 100644 src/libraries/System.Runtime.Internal/System.Runtime.Internal.sln create mode 100644 src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.cs create mode 100644 src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.csproj create mode 100644 src/libraries/System.Runtime.Internal/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/libraries/System.Runtime.Internal/src/Resources/Strings.resx create mode 100644 src/libraries/System.Runtime.Internal/src/System.Runtime.Internal.csproj create mode 100644 src/libraries/System.Runtime.Internal/tests/System.Runtime.Experimental.Tests.csproj delete mode 100644 src/tests/Common/override.targets diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs index a00ecd1b6196b0..dcc279db859893 100644 --- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs +++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs @@ -60,8 +60,7 @@ void CreateInstanceLic( public partial struct ComActivationContext { [RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url = "https://aka.ms/dotnet-illink/com")] - [CLSCompliant(false)] - public static unsafe ComActivationContext Create(ref ComActivationContextInternal cxtInt) + internal static unsafe ComActivationContext Create(ref ComActivationContextInternal cxtInt) { if (!Marshal.IsBuiltInComSupported) { diff --git a/src/libraries/System.Runtime.Internal/Directory.Build.props b/src/libraries/System.Runtime.Internal/Directory.Build.props new file mode 100644 index 00000000000000..e8d65546d0c807 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/Directory.Build.props @@ -0,0 +1,6 @@ + + + + Microsoft + + diff --git a/src/libraries/System.Runtime.Internal/README.md b/src/libraries/System.Runtime.Internal/README.md new file mode 100644 index 00000000000000..d3ccc259d9517b --- /dev/null +++ b/src/libraries/System.Runtime.Internal/README.md @@ -0,0 +1,3 @@ +# System.Runtime.Internal + +The System.Runtime.Internal library is designed for internal usage in our test tree. This library exposes some public APIs from System.Private.CoreLib for usage in our tests that are not exposed via the Microsoft.NETCore.App framework. These API are either used by the hosting layer (so they don't need to be exposed publicly) or used by some old internal tooling that we're working to remove in future versions of .NET. diff --git a/src/libraries/System.Runtime.Internal/System.Runtime.Internal.sln b/src/libraries/System.Runtime.Internal/System.Runtime.Internal.sln new file mode 100644 index 00000000000000..77580d36043a2d --- /dev/null +++ b/src/libraries/System.Runtime.Internal/System.Runtime.Internal.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "ref\System.Runtime.Internal.csproj", "{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{D00764F9-F736-4072-A7DD-B4BF05CF4786}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Internal", "src\System.Runtime.Internal.csproj", "{215536A6-ECCE-4AF9-B108-8ED370095D78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|Any CPU.Build.0 = Release|Any CPU + {215536A6-ECCE-4AF9-B108-8ED370095D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {215536A6-ECCE-4AF9-B108-8ED370095D78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {215536A6-ECCE-4AF9-B108-8ED370095D78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {215536A6-ECCE-4AF9-B108-8ED370095D78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {D00764F9-F736-4072-A7DD-B4BF05CF4786} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {19706846-1F47-42ED-B649-B0982EE96E6B} + EndGlobalSection +EndGlobal diff --git a/src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.cs b/src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.cs new file mode 100644 index 00000000000000..daf9834dfc1f09 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the https://aka.ms/api-review process. +// ------------------------------------------------------------------------------ +namespace Internal.Runtime.InteropServices +{ + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public static class ComActivator + { + // + // Summary: + // Entry point for unmanaged COM register/unregister API from managed code + // + // Parameters: + // cxt: + // Reference to a Internal.Runtime.InteropServices.ComActivationContext instance + // + // register: + // true if called for register or false to indicate unregister + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url = "https://aka.ms/dotnet-illink/com")] + public static void ClassRegistrationScenarioForType(ComActivationContext cxt, bool register) {} + // + // Summary: + // Entry point for unmanaged COM activation API from managed code + // + // Parameters: + // cxt: + // Reference to a Internal.Runtime.InteropServices.ComActivationContext instance + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url = "https://aka.ms/dotnet-illink/com")] + public static object GetClassFactoryForType(ComActivationContext cxt) => throw null; + } + public struct ComActivationContext + { + public System.Guid ClassId; + public System.Guid InterfaceId; + public string AssemblyPath; + public string AssemblyName; + public string TypeName; + } + public static class InMemoryAssemblyLoader + { + public static unsafe void LoadInMemoryAssembly(System.IntPtr moduleHandle, System.IntPtr assemblyPath) => throw null; + } +} + +namespace System.Runtime.CompilerServices +{ + public interface ICastable + { + bool IsInstanceOfInterface(RuntimeTypeHandle interfaceType, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out Exception? castError); + RuntimeTypeHandle GetImplType(RuntimeTypeHandle interfaceType); + } +} diff --git a/src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.csproj b/src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.csproj new file mode 100644 index 00000000000000..a6eed9b76175f5 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/ref/System.Runtime.Internal.csproj @@ -0,0 +1,14 @@ + + + System.Runtime.Internal + true + $(NetCoreAppCurrent) + enable + + + + + + + + diff --git a/src/libraries/System.Runtime.Internal/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Runtime.Internal/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 00000000000000..9ea4737d09ea56 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,4 @@ +# APIs that we don't need to expose since they're [UnmanagedCallersOnly] +MembersMustExist : Member 'public System.Int32 Internal.Runtime.InteropServices.ComActivator.GetClassFactoryForTypeInternal(Internal.Runtime.InteropServices.ComActivationContextInternal*)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'public System.Int32 Internal.Runtime.InteropServices.ComActivator.RegisterClassForTypeInternal(Internal.Runtime.InteropServices.ComActivationContextInternal*)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'public System.Int32 Internal.Runtime.InteropServices.ComActivator.UnregisterClassForTypeInternal(Internal.Runtime.InteropServices.ComActivationContextInternal*)' does not exist in the reference but it does exist in the implementation. diff --git a/src/libraries/System.Runtime.Internal/src/Resources/Strings.resx b/src/libraries/System.Runtime.Internal/src/Resources/Strings.resx new file mode 100644 index 00000000000000..70880515d4bc60 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/src/Resources/Strings.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Private.CoreLib Internal APIs are not supported. + + diff --git a/src/libraries/System.Runtime.Internal/src/System.Runtime.Internal.csproj b/src/libraries/System.Runtime.Internal/src/System.Runtime.Internal.csproj new file mode 100644 index 00000000000000..28658394d0f3cf --- /dev/null +++ b/src/libraries/System.Runtime.Internal/src/System.Runtime.Internal.csproj @@ -0,0 +1,13 @@ + + + true + enable + $(NetCoreAppCurrent) + true + SR.PlatformNotSupported_System_Runtime_Internal + true + + + + + diff --git a/src/libraries/System.Runtime.Internal/tests/System.Runtime.Experimental.Tests.csproj b/src/libraries/System.Runtime.Internal/tests/System.Runtime.Experimental.Tests.csproj new file mode 100644 index 00000000000000..d8ed841331b0f3 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/tests/System.Runtime.Experimental.Tests.csproj @@ -0,0 +1,55 @@ + + + true + true + $(NoWarn),1718,SYSLIB0013 + true + true + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser + disable + + $(Features.Replace('nullablePublicOnly', '') + + + $(DefineConstants);FEATURE_GENERIC_MATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tests/Common/override.targets b/src/tests/Common/override.targets deleted file mode 100644 index 0586ffe389928b..00000000000000 --- a/src/tests/Common/override.targets +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 2866110fb4c360..38de01131c1e26 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -80,7 +80,6 @@ <_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' != 'true'">true <_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' == 'true' And '$(CLRTestPriority)' <= '$(CLRTestPriorityToBuild)'">true <_WillCLRTestProjectBuild Condition="'$(CLRTestBuildAllTargets)' != 'allTargets' And '$(CLRTestTargetUnsupported)' == 'true'">false - <_WillCLRTestProjectBuild Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true' and '$(RuntimeFlavor)' == 'mono'">false <_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' == 'true'">false @@ -95,8 +94,6 @@ - - @@ -225,12 +222,11 @@ BeforeTargets="BeforeResolveReferences" > + Targets="GetLiveRefAssemblies"> - + false @@ -255,10 +251,6 @@ $(BaseOutputPath)\packages\Common\test_dependencies\test_dependencies\project.assets.json - - - - true diff --git a/src/tests/Interop/COM/Activator/Activator.csproj b/src/tests/Interop/COM/Activator/Activator.csproj index 87b0633ad30052..e56e4e8ae00459 100644 --- a/src/tests/Interop/COM/Activator/Activator.csproj +++ b/src/tests/Interop/COM/Activator/Activator.csproj @@ -1,8 +1,6 @@ Exe - - true true true diff --git a/src/tests/Interop/COM/Activator/ActivatorBuiltInComDisabled.csproj b/src/tests/Interop/COM/Activator/ActivatorBuiltInComDisabled.csproj index b119bcc691df99..aded9f0182369d 100644 --- a/src/tests/Interop/COM/Activator/ActivatorBuiltInComDisabled.csproj +++ b/src/tests/Interop/COM/Activator/ActivatorBuiltInComDisabled.csproj @@ -1,8 +1,6 @@ Exe - - true true true diff --git a/src/tests/Interop/COM/Activator/Program.cs b/src/tests/Interop/COM/Activator/Program.cs index b16802db9c93bd..9414eb6ce5e12c 100644 --- a/src/tests/Interop/COM/Activator/Program.cs +++ b/src/tests/Interop/COM/Activator/Program.cs @@ -12,7 +12,19 @@ namespace Activator using TestLibrary; using Xunit; - using Console = Internal.Console; + [ComImport] + [ComVisible(false)] + [Guid("00000001-0000-0000-C000-000000000046")] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IClassFactory + { + void CreateInstance( + [MarshalAs(UnmanagedType.Interface)] object pUnkOuter, + ref Guid riid, + out IntPtr ppvObject); + + void LockServer([MarshalAs(UnmanagedType.Bool)] bool fLock); + } class Program { diff --git a/src/tests/Interop/Directory.Build.targets b/src/tests/Interop/Directory.Build.targets index 0d5ce0b5580ea6..6e5570ee006b49 100644 --- a/src/tests/Interop/Directory.Build.targets +++ b/src/tests/Interop/Directory.Build.targets @@ -3,20 +3,11 @@ - + - - - - - - - diff --git a/src/tests/Interop/ICastable/Castable.cs b/src/tests/Interop/ICastable/Castable.cs index ee45820c9c808b..2a35c3f518ccde 100644 --- a/src/tests/Interop/ICastable/Castable.cs +++ b/src/tests/Interop/ICastable/Castable.cs @@ -5,8 +5,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; -using Console = Internal.Console; - public interface IRetArg { T ReturnArg(T t); @@ -114,7 +112,7 @@ public RuntimeTypeHandle GetImplType(RuntimeTypeHandle interfaceType) return default(RuntimeTypeHandle); } } - + public class Program { @@ -145,7 +143,7 @@ public static int Main() { typeof(IExtra), null }, //we should never use it } ); - + // testing simple cases Assert(implProxy is IRetThis, "implProxy should be castable to IRetThis via is"); Assert(!(implProxy is IUnimplemented), "implProxy should not be castable to IUnimplemented via is"); @@ -158,7 +156,7 @@ public static int Main() Assert(!(implProxy is IUnimplemented), "implProxy should not be castable to IUnimplemented via is"); Assert((implProxy as IUnimplemented) == null, "implProxy should not be castable to IUnimplemented via as"); - + // testing generics IRetArg retArgStr = (IRetArg)implProxy; Assert(retArgStr.ReturnArg("hohoho") == "hohoho", "retArgStr.ReturnArg() should return arg"); @@ -184,7 +182,7 @@ public static int Main() { var _ = (IRetThis)nullCastable; Assert(false, "Exceptions should be thrown from IsInstanceOfInterface"); - } + } catch (CastableException) {} Assert(!(nullCastable is IRetThis), "null castable shouldn't be allowed to be casted to anything"); @@ -198,7 +196,7 @@ public static int Main() var r = (IRetThis)badCastable; r.ReturnThis(); Assert(false, "Exceptions should be thrown from ReturnThis()"); - } + } catch (EntryPointNotFoundException) {} //delegate testing @@ -223,6 +221,6 @@ public static int Main() Console.WriteLine("Test FAILED!"); return -1; } - + } } diff --git a/src/tests/Interop/ICastable/Castable.csproj b/src/tests/Interop/ICastable/Castable.csproj index 6a0eb0bcfe5472..5156f6328dc41b 100644 --- a/src/tests/Interop/ICastable/Castable.csproj +++ b/src/tests/Interop/ICastable/Castable.csproj @@ -1,9 +1,7 @@ Exe - - true - true + true diff --git a/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.cs b/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.cs index e7df50ed4fa8bb..cfedcfd286ed23 100644 --- a/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.cs +++ b/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.cs @@ -9,8 +9,6 @@ using TestLibrary; using Xunit; -using Console = Internal.Console; - namespace LoadIjwFromModuleHandle { class LoadIjwFromModuleHandle diff --git a/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.csproj b/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.csproj index a42c985e422b89..d8bb911096e6d6 100644 --- a/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.csproj +++ b/src/tests/Interop/IJW/LoadIjwFromModuleHandle/LoadIjwFromModuleHandle.csproj @@ -1,8 +1,6 @@ Exe - - true true true From 4f4ee14aa37e0db40ecd20bd2dc40021bcff0942 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 17 Nov 2021 14:05:26 -0800 Subject: [PATCH 2/4] Don't build CoreLib in the build-test-job as nothing should need it any more. --- .../templates/runtimes/build-test-job.yml | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 562b426eebc1fd..3228c264bceb71 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -28,12 +28,6 @@ parameters: ### Build managed test components (native components are getting built as part ### of the the product build job). -### TODO: As of today, build of managed test components requires the product build -### as a prerequisite due to dependency on System.Private.Corelib. After switching -### over to its reference assembly we should be able to remove this dependency and -### run managed test builds in parallel with the product build job. - - jobs: - template: /eng/pipelines/${{ parameters.runtimeFlavor }}/templates/xplat-pipeline-job.yml parameters: @@ -48,10 +42,7 @@ jobs: liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} pool: ${{ parameters.pool }} dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} - ${{ if eq(parameters.runtimeFlavor, 'coreclr') }}: - liveRuntimeBuildParams: ${{ format('clr.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }} - ${{ if eq(parameters.runtimeFlavor, 'mono') }}: - liveRuntimeBuildParams: ${{ format('mono.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }} + liveRuntimeBuildParams: ${{ format('libs.ref+libs.native -c {0} -arch {1} -ci', parameters.liveLibrariesBuildConfig, parameters.archType) }} ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX'))) }}: compilerArg: '-clang9' @@ -84,14 +75,8 @@ jobs: timeoutInMinutes: 160 variables: - - ${{ each variable in parameters.variables }}: - - ${{ variable }} - - ${{ if eq(parameters.runtimeFlavor, 'coreclr') }}: - - name: liveRuntimeBuildParams - value: ${{ format('clr.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }} - - ${{ if eq(parameters.runtimeFlavor, 'mono') }}: - - name: liveRuntimeBuildParams - value: ${{ format('mono.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }} + - name: liveRuntimeBuildParams + value: ${{ format('libs.ref+libs.native -c {0} -arch {1} -ci', parameters.liveLibrariesBuildConfig, parameters.archType) }} - name: compilerArg value: '' - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}: From 64d30cf81083eb4c363a6fc8685c2aa2601e1c70 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 17 Nov 2021 14:20:13 -0800 Subject: [PATCH 3/4] Update src/tests/Interop/COM/Activator/Program.cs Co-authored-by: Aaron Robinson --- src/tests/Interop/COM/Activator/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Interop/COM/Activator/Program.cs b/src/tests/Interop/COM/Activator/Program.cs index 9414eb6ce5e12c..f77c34befefc82 100644 --- a/src/tests/Interop/COM/Activator/Program.cs +++ b/src/tests/Interop/COM/Activator/Program.cs @@ -16,7 +16,7 @@ namespace Activator [ComVisible(false)] [Guid("00000001-0000-0000-C000-000000000046")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IClassFactory + interface IClassFactory { void CreateInstance( [MarshalAs(UnmanagedType.Interface)] object pUnkOuter, From f233d7621981076f52765558d210cb6fb0557bee Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 17 Nov 2021 14:23:45 -0800 Subject: [PATCH 4/4] Explicitly block packing Ssytem.Runtime.Internal into a NuGet package to make it more difficult to accidentally ship. --- .../System.Runtime.Internal/Directory.Build.targets | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/libraries/System.Runtime.Internal/Directory.Build.targets diff --git a/src/libraries/System.Runtime.Internal/Directory.Build.targets b/src/libraries/System.Runtime.Internal/Directory.Build.targets new file mode 100644 index 00000000000000..8890fcf4bd3dc6 --- /dev/null +++ b/src/libraries/System.Runtime.Internal/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + + + + +