diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets index 39fab7280dcc..db2e0116e5f6 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets @@ -27,41 +27,21 @@ Copyright (c) .NET Foundation. All rights reserved. - - - false - - - - false - - - false + false + false + false + false + false + <_EnableConsumingManagedCodeFromNativeHosting Condition="'$(_EnableConsumingManagedCodeFromNativeHosting)' == ''">false - - - false - - true diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 21e423da555d..10f28f673f98 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -359,11 +359,6 @@ Copyright (c) .NET Foundation. All rights reserved. --> - - + + + + + + () + ["System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization"].Value() .Should().BeFalse(); runtimeConfig["runtimeOptions"]["configProperties"] - ["System.StartupHookProvider.IsSupported"].Value() + ["System.Resources.ResourceManager.AllowCustomResourceTypes"].Value() .Should().BeFalse(); runtimeConfig["runtimeOptions"]["configProperties"] - ["System.Resources.ResourceManager.AllowCustomResourceTypes"].Value() + ["System.Runtime.InteropServices.BuiltInComInterop.IsSupported"].Value() .Should().BeFalse(); runtimeConfig["runtimeOptions"]["configProperties"] - ["System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization"].Value() + ["System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting"].Value() + .Should().BeFalse(); + runtimeConfig["runtimeOptions"]["configProperties"] + ["System.Runtime.InteropServices.EnableCppCLIHostActivation"].Value() + .Should().BeFalse(); + runtimeConfig["runtimeOptions"]["configProperties"] + ["System.StartupHookProvider.IsSupported"].Value() .Should().BeFalse(); } else { - runtimeConfigContents.Should().NotContain("System.Runtime.InteropServices.Marshal.IsBuiltInComSupported"); - runtimeConfigContents.Should().NotContain("System.StartupHookProvider.IsSupported"); - runtimeConfigContents.Should().NotContain("System.Resources.ResourceManager.AllowCustomResourceTypes"); runtimeConfigContents.Should().NotContain("System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization"); + runtimeConfigContents.Should().NotContain("System.Resources.ResourceManager.AllowCustomResourceTypes"); + runtimeConfigContents.Should().NotContain("System.Runtime.InteropServices.BuiltInComInterop.IsSupported"); + runtimeConfigContents.Should().NotContain("System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting"); + runtimeConfigContents.Should().NotContain("System.Runtime.InteropServices.EnableCppCLIHostActivation"); + runtimeConfigContents.Should().NotContain("System.StartupHookProvider.IsSupported"); } }