Skip to content

Commit

Permalink
source-build: stop overriding aspnetcore version (backport of #14938)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakael committed Jan 13, 2023
1 parent 5ee269e commit 9446347
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/SourceBuild/tarball/content/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -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)" />
Expand Down
12 changes: 12 additions & 0 deletions src/SourceBuild/tarball/content/tools-local/init-build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -22,6 +23,7 @@
<CallTarget Targets="
UnpackTarballs;
BuildXPlatTasks;
PatchPackageVersions;
BuildLeakDetection;
ExtractToolPackage;
GenerateRootFs;
Expand All @@ -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" >
Expand Down

0 comments on commit 9446347

Please sign in to comment.