ayaports/user/dotnet6-build/build_14816-stop-overriding-aspnetcore-version.patch

69 lines
3.8 KiB
Diff

From 94463478bd6aaec208bc5e3dd1d120e0a49aeaaa Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/installer/pull/14816
From: Antoine Martin <dev@ayakael.net>
Date: Tue, 15 Nov 2022 01:08:29 -0500
Subject: [PATCH 3/3] source-build: stop overriding aspnetcore version
(backport of #14938)
---
.../tarball/content/Directory.Build.props | 4 ----
.../tarball/content/tools-local/init-build.proj | 12 ++++++++++++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 2e2d7e8bc..6b08fa71b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -222,12 +222,8 @@
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimePackageVersion" Version="$(runtimeOutputPackageVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimeVersion" Version="$(runtimeOutputPackageVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppHostPackageVersion" Version="$(runtimeOutputPackageVersion)" />
- <ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimeLinux$(Platform)PackageVersion)" />
<!-- core-sdk uses this property for ASP.NET blob directory -->
<ExtraPackageVersionPropsPackageInfo Include="VSRedistCommonAspNetCoreTargetingPackx6430PackageVersion" Version="$(aspnetcoreOutputPackageVersion)" />
- <!-- OSX needs the OSX version instead of Linux. We don't have a lot of flexibility in how we output these properties so we're relying on the previous one being blank if the Linux version of the package is missing. -->
- <ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimeOsxX64PackageVersion)" DoNotOverwrite="true" />
- <ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)" DoNotOverwrite="true" />
<!-- Used by installer to determine sdk version -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftDotnetToolsetInternalPackageVersion" Version="%24(MicrosoftNETSdkPackageVersion)" />
diff --git a/tools-local/init-build.proj b/tools-local/init-build.proj
index 701f76c0c..ac4508947 100644
--- a/tools-local/init-build.proj
+++ b/tools-local/init-build.proj
@@ -9,6 +9,7 @@
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="NuGetPack" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ZipFileExtractToDirectory" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceTextInFile" />
+ <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceRegexInFiles" />
<ItemGroup>
<BuildTasksTarget Include="Restore;Build;InstallResolver" />
@@ -22,6 +23,7 @@
<CallTarget Targets="
UnpackTarballs;
BuildXPlatTasks;
+ PatchPackageVersions;
BuildLeakDetection;
ExtractToolPackage;
GenerateRootFs;
@@ -38,6 +40,16 @@
<Delete Files="$(CompletedSemaphorePath)*.*" />
</Target>
+ <!-- TODO: Remove this when the .NET 8 artifacts tarball no longer includes MicrosoftAspNetCoreAppRuntimePackageVersion -->
+ <Target Name="PatchPackageVersions">
+ <!-- Rename MicrosoftAspNetCoreAppRuntimePackageVersion so it isn't used
+ Fixes https://github.com/dotnet/installer/issues/14492 -->
+ <ReplaceRegexInFiles
+ InputFiles="$(IntermediatePath)PreviouslySourceBuiltPackageVersions.props"
+ OldTextRegex="\bMicrosoftAspNetCoreAppRuntimePackageVersion\b"
+ NewText="__unused" />
+ </Target>
+
<Target Name="UnpackTarballs"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(CompletedSemaphorePath)UnpackTarballs.complete" >
--
2.38.2