Skip to content

Commit

Permalink
[msbuild] Take the .NET version into account when computing the illin…
Browse files Browse the repository at this point in the history
…k.dll location. (#15876)

We use illink.dll from the executing .NET version: if we're building with .NET
7, then we're using illink from .NET 7. This means we can't hard-code 'net6.0'
when computing the path to illink.dll for remote builds.

Fixes https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1611403.
  • Loading branch information
rolfbjarne authored Sep 7, 2022
1 parent 6590c11 commit 2558c98
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
Outputs="$(_LinkSemaphore)">

<PropertyGroup>
<!-- We need to use net5.0 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', 'net6.0').Replace('$([System.IO.Path]::GetFileName('$(ILLinkTasksAssembly)'))', 'illink.dll'))</_RemoteILLinkPath>
<!-- 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>
</PropertyGroup>

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

6 comments on commit 2558c98

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.