Skip to content

Commit 823c5ba

Browse files
[main] [6.0.4xx] [msbuild] Use _TrimmerDefaultAction if TrimmerDefaultAction isn't set. (#16130)
The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: #16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047. Backport of #16126 Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
1 parent deb0faa commit 823c5ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
314314
<PropertyGroup>
315315
<!-- We need to use netX.Y because when building from VS it sets MSBuildRuntimeType to Core and will pick net472 (which doesn't contain the illink assembly) -->
316316
<_RemoteILLinkPath>$(ILLinkTasksAssembly.Replace('$(NetCoreRoot)', '$(_DotNetRootRemoteDirectory)').Replace('net472', 'net$(BundledNETCoreAppTargetFrameworkVersion)').Replace('$([System.IO.Path]::GetFileName('$(ILLinkTasksAssembly)'))', 'illink.dll'))</_RemoteILLinkPath>
317+
318+
<!-- The .NET 7 linker sets _TrimmerDefaultAction instead of TrimmerDefaultAction, so copy that value if it's set (and TrimmerDefaultAction is not set) -->
319+
<TrimmerDefaultAction Condition="'$(TrimmerDefaultAction)' == ''">$(_TrimmerDefaultAction)</TrimmerDefaultAction>
317320
</PropertyGroup>
318321

319322
<!-- Include Debug symbols as input so those are copied to the server -->

0 commit comments

Comments
 (0)