Skip to content

Commit

Permalink
[6.0.4xx] [msbuild] Use _TrimmerDefaultAction if TrimmerDefaultAction…
Browse files Browse the repository at this point in the history
… isn't set.

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: xamarin#16125.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047.
  • Loading branch information
rolfbjarne committed Sep 26, 2022
1 parent 1c154eb commit a0f1ff3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
<PropertyGroup>
<!-- 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) -->
<_RemoteILLinkPath>$(ILLinkTasksAssembly.Replace('$(NetCoreRoot)', '$(_DotNetRootRemoteDirectory)').Replace('net472', 'net$(BundledNETCoreAppTargetFrameworkVersion)').Replace('$([System.IO.Path]::GetFileName('$(ILLinkTasksAssembly)'))', 'illink.dll'))</_RemoteILLinkPath>

<!-- The .NET 7 linker sets _TrimmerDefaultAction instead of TrimmerDefaultAction, so copy that value if it's set (and TrimmerDefaultAction is not set) -->
<TrimmerDefaultAction Condition="'$(TrimmerDefaultAction)' == ''">$(_TrimmerDefaultAction)</TrimmerDefaultAction>
</PropertyGroup>

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

0 comments on commit a0f1ff3

Please sign in to comment.