Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove ILLink version override workaround
Now that we consume ILLink packages from dotnet/runtime,
we can use the existing version override logic that we use for
other runtime packs.
  • Loading branch information
sbomer committed Mar 30, 2023
commit 09b70c2c2b7d971a798eb60dc012a6114b708d7d
1 change: 0 additions & 1 deletion src/Layout/redist/targets/OverlaySdkOnLKG.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
<OverrideAndCreateBundledNETCoreAppPackageVersion
Stage0MicrosoftNETCoreAppRefPackageVersionPath="$(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/Microsoft.NETCoreSdk.BundledVersions.props"
MicrosoftNETCoreAppRefPackageVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
MicrosoftNETILLinkTasksPackageVersion="$(MicrosoftNETILLinkTasksPackageVersion)"
NewSDKVersion="$(Version)"
OutputPath="$(SdkOutputDirectory)/Microsoft.NETCoreSdk.BundledVersions.props"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

Expand Down Expand Up @@ -36,10 +36,6 @@ public sealed class OverrideAndCreateBundledNETCoreAppPackageVersion : Task

[Required] public string MicrosoftNETCoreAppRefPackageVersion { get; set; }

// TODO: remove this once linker packages are produced from dotnet/runtime
// and replace it with MicrosoftNETCoreAppRefPackageVersion.
[Required] public string MicrosoftNETILLinkTasksPackageVersion { get; set; }

[Required] public string NewSDKVersion { get; set; }

[Required] public string OutputPath { get; set; }
Expand All @@ -50,15 +46,13 @@ public override bool Execute()
ExecuteInternal(
File.ReadAllText(Stage0MicrosoftNETCoreAppRefPackageVersionPath),
MicrosoftNETCoreAppRefPackageVersion,
MicrosoftNETILLinkTasksPackageVersion,
NewSDKVersion));
return true;
}

public static string ExecuteInternal(
string stage0MicrosoftNETCoreAppRefPackageVersionContent,
string microsoftNETCoreAppRefPackageVersion,
string microsoftNETILLinkTasksPackageVersion,
string newSDKVersion)
{
var projectXml = XDocument.Parse(stage0MicrosoftNETCoreAppRefPackageVersionContent);
Expand Down Expand Up @@ -123,9 +117,8 @@ void CheckAndReplaceAttribute(XAttribute attribute)
.Elements(ns + "KnownCrossgen2Pack").First().Attribute("Crossgen2PackVersion"));
CheckAndReplaceAttribute(itemGroup
.Elements(ns + "KnownILCompilerPack").First().Attribute("ILCompilerPackVersion"));

// TODO: replace this with CheckAndReplaceAttribute once linker packages are produced from dotnet/runtime.
itemGroup.Elements(ns + "KnownILLinkPack").First().Attribute("ILLinkPackVersion").Value = microsoftNETILLinkTasksPackageVersion;
CheckAndReplaceAttribute(itemGroup
.Elements(ns + "KnownILLinkPack").First().Attribute("ILLinkPackVersion"));

CheckAndReplaceAttribute(itemGroup
.Elements(ns + "KnownRuntimePack").First().Attribute("LatestRuntimeFrameworkVersion"));
Expand Down