Skip to content

Commit 3e5f360

Browse files
committed
source-build: stop overriding aspnetcore version (backport of #14938)
1 parent c354a25 commit 3e5f360

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/SourceBuild/tarball/content/Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,8 @@
222222
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimePackageVersion" Version="$(runtimeOutputPackageVersion)" />
223223
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimeVersion" Version="$(runtimeOutputPackageVersion)" />
224224
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppHostPackageVersion" Version="$(runtimeOutputPackageVersion)" />
225-
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimeLinux$(Platform)PackageVersion)" />
226225
<!-- core-sdk uses this property for ASP.NET blob directory -->
227226
<ExtraPackageVersionPropsPackageInfo Include="VSRedistCommonAspNetCoreTargetingPackx6430PackageVersion" Version="$(aspnetcoreOutputPackageVersion)" />
228-
<!-- 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. -->
229-
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimeOsxX64PackageVersion)" DoNotOverwrite="true" />
230-
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)" DoNotOverwrite="true" />
231227

232228
<!-- Used by installer to determine sdk version -->
233229
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftDotnetToolsetInternalPackageVersion" Version="%24(MicrosoftNETSdkPackageVersion)" />

src/SourceBuild/tarball/content/tools-local/init-build.proj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="NuGetPack" />
1010
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ZipFileExtractToDirectory" />
1111
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceTextInFile" />
12+
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceRegexInFiles" />
1213

1314
<ItemGroup>
1415
<BuildTasksTarget Include="Restore;Build;InstallResolver" />
@@ -22,6 +23,7 @@
2223
<CallTarget Targets="
2324
UnpackTarballs;
2425
BuildXPlatTasks;
26+
PatchPackageVersions;
2527
BuildLeakDetection;
2628
ExtractToolPackage;
2729
GenerateRootFs;
@@ -38,6 +40,16 @@
3840
<Delete Files="$(CompletedSemaphorePath)*.*" />
3941
</Target>
4042

43+
<!-- TODO: Remove this when the .NET 8 artifacts tarball no longer includes MicrosoftAspNetCoreAppRuntimePackageVersion -->
44+
<Target Name="PatchPackageVersions">
45+
<!-- Rename MicrosoftAspNetCoreAppRuntimePackageVersion so it isn't used
46+
Fixes https://github.com/dotnet/installer/issues/14492 -->
47+
<ReplaceRegexInFiles
48+
InputFiles="$(IntermediatePath)PreviouslySourceBuiltPackageVersions.props"
49+
OldTextRegex="\bMicrosoftAspNetCoreAppRuntimePackageVersion\b"
50+
NewText="__unused" />
51+
</Target>
52+
4153
<Target Name="UnpackTarballs"
4254
Inputs="$(MSBuildProjectFullPath)"
4355
Outputs="$(CompletedSemaphorePath)UnpackTarballs.complete" >

0 commit comments

Comments
 (0)