Skip to content

Commit 59c583c

Browse files
[infra] Enable trimming on Helix for Apple mobile (#100669)
* Add ILLink support to build machines This commit introduces the EnableAggressiveTrimming parameter in the Apple mobile targets for build machines. It ensures that parameters and items used by the ILLink target are passed correctly. * Add ILLink support on Helix This commit introduces the EnableAggressiveTrimming parameter in the proxy project. Additionally, it ensures that ILLink props and targets are included into the payload. * Fix trimming-related test failures This commit adds ILLink descriptor files to preserve types needed for tests. Additionally, it disables tests that are not trim-compatible. * Fix ILLinkTasksAssembly path in AppleBuild.LocalBuild.props * Remove EnableSoftTrimming property --------- Co-authored-by: Ivan Povazan <[email protected]>
1 parent a70b9a1 commit 59c583c

File tree

47 files changed

+260
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+260
-74
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ jobs:
3535
testGroup: innerloop
3636
nameSuffix: AllSubsets_Mono
3737
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
38-
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true
38+
# Don't trim tests on rolling builds
39+
${{ if eq(variables['isRollingBuild'], true) }}:
40+
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=false
41+
${{ else }}:
42+
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=true
3943
timeoutInMinutes: 480
4044
# extra steps, run tests
4145
postBuildSteps:

eng/pipelines/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ extends:
10091009
jobParameters:
10101010
testGroup: innerloop
10111011
nameSuffix: AllSubsets_Mono
1012-
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true
1012+
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:EnableAggressiveTrimming=true
10131013
timeoutInMinutes: 480
10141014
condition: >-
10151015
or(

eng/testing/tests.ioslike.targets

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<!-- running aot-helix tests locally, so we can test with the same project file as CI -->
1717
<_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)</_AOTBuildCommand>
1818
<!-- The command below sets default properties for runtime and library tests -->
19-
<_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR=&quot;$XHARNESS_EXECUTION_DIR&quot; /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=true /p:Configuration=$(Configuration)</_AOTBuildCommand>
19+
<_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR=&quot;$XHARNESS_EXECUTION_DIR&quot; /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=true /p:Configuration=$(Configuration) /p:EnableAggressiveTrimming=$(EnableAggressiveTrimming)</_AOTBuildCommand>
2020
<_AOTBuildCommand Condition="'$(NativeLib)' != ''">$(_AOTBuildCommand) /p:NativeLib=$(NativeLib) /p:BundlesResources=$(BundlesResources) /p:ForceLibraryModeGenerateAppBundle=$(ForceLibraryModeGenerateAppBundle)</_AOTBuildCommand>
2121
<_AOTBuildCommand>$(_AOTBuildCommand) </_AOTBuildCommand>
2222

@@ -46,11 +46,11 @@
4646

4747
<PropertyGroup>
4848
<AppleBuildDependsOn>PrepareForAppleBuildApp;$(AppleBuildDependsOn);_CopyTestArchive</AppleBuildDependsOn>
49-
49+
5050
<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOn)' == 'local'">AppleBuild</BundleTestAppleAppDependsOn>
5151
<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOnHelix)' == 'true'">$(BundleTestAppleAppDependsOn);_BundleAOTTestAppleAppForHelix;_CopyTestArchive</BundleTestAppleAppDependsOn>
5252
</PropertyGroup>
53-
53+
5454
<Target Name="BundleTestAppleApp" DependsOnTargets="$(BundleTestAppleAppDependsOn)" />
5555

5656
<UsingTask Condition="'$(BuildTestsOnHelix)' == 'true'"
@@ -61,7 +61,7 @@
6161
<PropertyGroup>
6262
<AppBundlePath>$(BundleDir)publish</AppBundlePath>
6363
</PropertyGroup>
64-
64+
6565
<PropertyGroup>
6666
<_MainAssemblyPath Condition="'%(AppleAssembliesToBundle.FileName)' == $(AssemblyName) and '%(AppleAssembliesToBundle.Extension)' == '.dll'">%(AppleAssembliesToBundle.Identity)</_MainAssemblyPath>
6767
<RuntimeConfigFilePath>$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))</RuntimeConfigFilePath>
@@ -76,6 +76,8 @@
7676
<BundleFiles Include="$(MonoProjectRoot)\msbuild\apple\data\*" TargetDir="publish" />
7777
<ExtraFiles Condition="'%(AppleAssembliesToBundle._IsNative)' == 'true'"
7878
Include="@(AppleAssembliesToBundle)" TargetDir="extraFiles\%(AppleAssembliesToBundle.RecursiveDir)" />
79+
<ExtraFiles Condition="Exists(%(TrimmerRootDescriptor.Identity))"
80+
Include="@(TrimmerRootDescriptor)" TargetDir="extraFiles" />
7981
</ItemGroup>
8082

8183
<ItemGroup Condition="'$(UseNativeAOTRuntime)' == 'true' and '$(HybridGlobalization)' == 'false'" >
@@ -104,41 +106,62 @@
104106

105107
<_RuntimePackFiles Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)**\*.*" />
106108
<_RuntimePackFiles Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)*.*" />
107-
109+
108110
<_UnusedRuntimePackFiles Include="@(_PublishBundleFiles)" Exclude="@(_RuntimePackFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
109111
<_UsedRuntimePackFiles Include="@(_PublishBundleFiles)" Exclude="@(_UnusedRuntimePackFiles)" />
110-
112+
111113
<_RuntimePackFilesToDelete Include="@(_RuntimePackFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
114+
<!-- ILLink properties -->
115+
<AppleReferenceSharedPathFiles Include="%(ReferencePath.Identity)" Condition="Exists('@(ReferencePath->'$(LibrariesSharedFrameworkBinArtifactsPath)%(FileName)%(Extension)')')" />
116+
<ReferenceExtraPathFiles Include="%(ReferencePath.Identity)" Condition="!Exists('@(ReferencePath->'$(LibrariesSharedFrameworkBinArtifactsPath)%(FileName)%(Extension)')')" />
112117
</ItemGroup>
113118

114119
<!-- Remove the runtime pack parts from the self contained app. We'll restore on helix -->
115120
<Delete Condition="'$(UsePortableRuntimePack)' == 'true'" Files="@(_RuntimePackFilesToDelete)" />
121+
<!-- Copy ILLink.Substitutions files -->
122+
<Copy SourceFiles="%(ReferenceExtraPathFiles.Identity)" DestinationFolder="$(BundleDir)\extraFiles" />
116123

117124
<!-- To recreate the original project on helix, we need to set the apple properties also, same as the
118125
library test project. Eg. $(InvariantGlobalization) -->
119126
<ItemGroup>
120-
<_ApplePropertyNames Include="InvariantGlobalization" />
121-
<_ApplePropertyNames Include="HybridGlobalization" />
127+
<!-- Configuration properties -->
122128
<_ApplePropertyNames Include="AssemblyName" />
123-
<_ApplePropertyNames Include="MonoEnableLLVM" />
129+
<_ApplePropertyNames Include="IncludesTestRunner" />
124130
<_ApplePropertyNames Include="MainLibraryFileName" />
131+
<_ApplePropertyNames Include="MonoEnableLLVM" />
132+
<_ApplePropertyNames Include="ShouldILStrip" />
125133
<_ApplePropertyNames Include="UseConsoleUITemplate" />
126134
<_ApplePropertyNames Include="UseRuntimeComponents" />
127-
<_ApplePropertyNames Include="IncludesTestRunner" />
128-
<_ApplePropertyNames Include="ShouldILStrip" />
135+
<_ApplePropertyNames Include="_NetCoreAppToolCurrent" />
136+
137+
<!-- Globalization properties -->
138+
<_ApplePropertyNames Include="HybridGlobalization" />
139+
<_ApplePropertyNames Include="InvariantGlobalization" />
140+
141+
<_AppleUsedRuntimePackFiles
142+
Include="@(_UsedRuntimePackFiles->'%(FileName)%(Extension)')"
143+
RemoveMetadata="_IsNative;TargetDir" />
129144

130145
<_ApplePropertiesToPass
131-
Include="$(%(_ApplePropertyNames.Identity))"
132-
Name="%(_ApplePropertyNames.Identity)"
133-
ConditionToUse__="%(_ApplePropertyNames.ConditionToUse__)" />
134-
135-
<_AppleUsedRuntimePackFiles
136-
Include="@(_UsedRuntimePackFiles->'%(FileName)%(Extension)')"
137-
RemoveMetadata="_IsNative;TargetDir" />
138-
146+
Include="$(%(_ApplePropertyNames.Identity))"
147+
Name="%(_ApplePropertyNames.Identity)"
148+
ConditionToUse__="%(_ApplePropertyNames.ConditionToUse__)" />
149+
139150
<_AppleItemsToPass Include="@(_AppleUsedRuntimePackFiles)"
140151
OriginalItemName__="_AppleUsedRuntimePackFiles" />
141152

153+
<_AppleItemsToPass Include="@(AppleReferenceSharedPathFiles->'%(FileName)%(Extension)')"
154+
OriginalItemName__="AppleReferenceSharedPathFiles" />
155+
156+
<_AppleItemsToPass Include="@(ReferenceExtraPathFiles->'%(FileName)%(Extension)')"
157+
OriginalItemName__="AppleReferenceExtraPathFiles" />
158+
159+
<_AppleItemsToPass Include="@(RuntimeHostConfigurationOption)"
160+
OriginalItemName__="_AppleUsedRuntimeHostConfigurationOption" />
161+
162+
<_AppleItemsToPass Include="@(TrimmerRootAssembly)"
163+
OriginalItemName__="TrimmerRootAssembly" />
164+
142165
<!-- Example of passing items to the project
143166
144167
<_AppleItemsToPass Include="@(BundleFiles)" OriginalItemName__="BundleFiles" ConditionToUse__="'$(Foo)' != 'true'" />
@@ -164,7 +187,7 @@
164187
<IncludesTestRunner Condition="'$(IncludesTestRunner)' == ''">true</IncludesTestRunner>
165188
<Optimized Condition="'$(Configuration)' == 'Release'">true</Optimized>
166189
<MainLibraryFileName Condition="'$(MainLibraryFileName)' == '' and '$(IsRuntimeTests)' != 'true' and '$(IncludesTestRunner)' == 'true'">AppleTestRunner.dll</MainLibraryFileName>
167-
190+
168191
<AppleBuildDir>$(PublishDir)</AppleBuildDir>
169192
<AppleBundleDir>$(BundleDir)</AppleBundleDir>
170193
</PropertyGroup>
@@ -181,7 +204,7 @@
181204
<_InternalForceInterpret>true</_InternalForceInterpret>
182205
<_IsNative>true</_IsNative>
183206
</AppleAssembliesToBundle>
184-
207+
185208
<_PublishAssemblies Include="$(PublishDir)\**\*.dll" Exclude="$(PublishDir)\**\*.resources.dll" />
186209
<_SatelliteAssemblies Include="$(PublishDir)\**\*.resources.dll" />
187210

@@ -212,4 +235,4 @@
212235
<RemoveDir Condition="'$(NeedsToBuildAppsOnHelixLocal)' != 'true'" Directories="$(OutDir)" />
213236
</Target>
214237

215-
</Project>
238+
</Project>

eng/testing/tests.mobile.targets

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,12 @@
2424
<DotnetPgoToolPath>$([MSBuild]::NormalizePath('$(DotnetPgoToolDir)', 'dotnet-pgo'))</DotnetPgoToolPath>
2525
</PropertyGroup>
2626

27-
<PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true' or '$(EnableSoftTrimming)' == 'true'">
27+
<!-- When tests are built on Helix, we don't want to invoke ILLink on build machines -->
28+
<PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true' and '$(BuildTestsOnHelix)' != 'true'">
2829
<PublishTrimmed>true</PublishTrimmed>
2930
<!-- Suppress trimming warnings as these are tests -->
3031
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
3132
<NoWarn>$(NoWarn);IL2103;IL2105;IL2025;IL2111</NoWarn>
32-
<!-- Warns about missing Xamarin.iOS.dll -->
33-
<NoWarn Condition="'$(EnableSoftTrimming)' == 'true'">$(NoWarn);IL2035</NoWarn>
34-
<!-- https://github.com/dotnet/sdk/issues/18581 tracks needing to set 2 properties to disable warnings. -->
35-
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
3633

3734
<!-- Reduce library test app size by trimming framework library features -->
3835
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' != 'Debug'">false</DebuggerSupport>
@@ -93,10 +90,9 @@
9390

9491
<!-- This .targets file is also imported by the runtime Trimming tests, and we want to be able to manually configure trimming in them so this
9592
should be considered if we ever want to change the Condition of the ConfigureTrimming target -->
96-
<Target Name="ConfigureTrimming" Condition="('$(EnableAggressiveTrimming)' == 'true' or '$(EnableSoftTrimming)' == 'true') And '$(SkipConfigureTrimming)' != 'true'" AfterTargets="AddTestRunnersToPublishedFiles">
93+
<Target Name="ConfigureTrimming" Condition="'$(EnableAggressiveTrimming)' == 'true' And '$(SkipConfigureTrimming)' != 'true'" AfterTargets="AddTestRunnersToPublishedFiles">
9794
<PropertyGroup>
98-
<TrimMode Condition="'$(EnableAggressiveTrimming)' == 'true'">link</TrimMode>
99-
<TrimMode Condition="'$(EnableSoftTrimming)' == 'true'">copyused</TrimMode>
95+
<TrimMode>link</TrimMode>
10096
</PropertyGroup>
10197

10298
<ItemGroup>
@@ -107,24 +103,11 @@
107103
TrimMode="" is needed so the root assemblies are correctly identified -->
108104
<ResolvedFileToPublish TrimMode="" Condition="'%(FileName)' == '$(AssemblyName)'" />
109105

110-
<!-- TODO: find out why these assemblies aren't copied by copyused even though they're referenced -->
111-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.ComponentModel.EventBasedAsync'" />
112-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Diagnostics.FileVersionInfo'" />
113-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Drawing.Primitives'" />
114-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.IO.Pipelines'" />
115-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Memory'" />
116-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Net.WebHeaderCollection'" />
117-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Runtime.Serialization.Formatters'" />
118-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Security.AccessControl'" />
119-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Security.Claims'" />
120-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Security.Permissions'" />
121-
<ResolvedFileToPublish TrimMode="Copy" Condition="'$(EnableSoftTrimming)' == 'true' and '%(FileName)' == 'System.Transactions.Local'" />
122-
123106
<!-- Even though we are trimming the test runner assembly, we want it to be treated
124107
as a root -->
125108
<TrimmerRootAssembly
126109
Condition="$([System.String]::Copy('%(ResolvedFileToPublish.FileName)%(ResolvedFileToPublish.Extension)').EndsWith('TestRunner.dll'))"
127-
Include="%(ResolvedFileToPublish.FullPath)" />
110+
Include="%(ResolvedFileToPublish.FileName)" />
128111
</ItemGroup>
129112

130113
<ItemGroup>

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public static bool IsMetadataTokenSupported
283283
public static bool UsesMobileAppleCrypto => IsMacCatalyst || IsiOS || IstvOS;
284284

285285
// Changed to `true` when trimming
286-
public static bool IsBuiltWithAggressiveTrimming => IsNativeAot;
286+
public static bool IsBuiltWithAggressiveTrimming => IsNativeAot || IsAppleMobile;
287287
public static bool IsNotBuiltWithAggressiveTrimming => !IsBuiltWithAggressiveTrimming;
288288
public static bool IsTrimmedWithILLink => IsBuiltWithAggressiveTrimming && !IsNativeAot;
289289

src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,7 @@ public void ComplexObj_As_Enumerable_Element()
21192119

21202120
#if !BUILDING_SOURCE_GENERATOR_TESTS
21212121
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
2122+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91923", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
21222123
public void TraceSwitchTest()
21232124
{
21242125
var dic = new Dictionary<string, string>
@@ -2148,6 +2149,7 @@ private void ValidateGeolocation(IGeolocation location)
21482149
[Fact]
21492150
#if !BUILDING_SOURCE_GENERATOR_TESTS
21502151
[ActiveIssue("Investigate Build browser-wasm linux Release LibraryTests_EAT CI failure for reflection impl", TestPlatforms.Browser)]
2152+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91923", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
21512153
#endif
21522154
public void TestGraphWithUnsupportedMember()
21532155
{

src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public static IEnumerable<object[]> LateCall_OptionalValues_Data()
9696

9797
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
9898
[ActiveIssue("https://github.com/dotnet/runtime/issues/51834", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
99+
[ActiveIssue("https://github.com/dotnet/runtime/issues/51834", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
99100
[MemberData(nameof(LateCall_OptionalValues_Data))]
100101
public void LateCall_OptionalValues(string memberName, object[] arguments, Type[] typeArguments, string expectedValue)
101102
{
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<linker>
2+
<assembly fullname="System" />
3+
<assembly fullname="System.Private.CoreLib" />
4+
<assembly fullname="System.Configuration" />
5+
<assembly fullname="System.Configuration.ConfigurationManager" />
6+
</linker>

src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
</ItemGroup>
9898
<ItemGroup>
9999
<ProjectReference Include="..\src\System.Configuration.ConfigurationManager.csproj" />
100+
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
100101
</ItemGroup>
101102
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
102103
<Reference Include="System.Configuration" />
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<linker>
2+
<assembly fullname="System.Data" />
3+
</linker>

src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,6 @@
123123
<ItemGroup>
124124
<PackageReference Include="System.Data.Common.TestData" Version="$(SystemDataCommonTestDataVersion)" />
125125
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
126+
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
126127
</ItemGroup>
127128
</Project>

src/libraries/System.Data.Common/tests/System/Data/XmlDataReaderTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class XmlDataReaderTest
3636
{
3737
[Fact]
3838
[ActiveIssue("https://github.com/dotnet/runtime/issues/51369", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
39+
[ActiveIssue("https://github.com/dotnet/runtime/issues/51369", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
3940
public void XmlLoadTest()
4041
{
4142
var ds = new DataSet();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<linker>
2+
<assembly fullname="System.Diagnostics.FileVersionInfo.TestAssembly" />
3+
</linker>

src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@
5252
<!-- R2R testing does not tolerate the combination of a regular project reference and a content reference. -->
5353
<!-- This is a bug in the SDK tracked here: https://github.com/dotnet/sdk/issues/30718 -->
5454
<PublishReadyToRunExclude Include="System.Diagnostics.FileVersionInfo.TestAssembly.dll" />
55+
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
5556
</ItemGroup>
5657
</Project>

0 commit comments

Comments
 (0)