Skip to content

Fix empty RPM dependency versions#20891

Open
NikolaMilosavljevic wants to merge 1 commit into
dotnet:release/8.0.4xxfrom
NikolaMilosavljevic:rpm.deps
Open

Fix empty RPM dependency versions#20891
NikolaMilosavljevic wants to merge 1 commit into
dotnet:release/8.0.4xxfrom
NikolaMilosavljevic:rpm.deps

Conversation

@NikolaMilosavljevic

Copy link
Copy Markdown
Member

Problem

The SDK RPM package was generated with empty dependency versions. In src/redist/targets/packaging/rpm/dotnet-config.json, each rpm_dependencies entry has a package_version token that GenerateRPMs.targets substitutes using four MSBuild properties:

  • MicrosoftNETCoreAppRuntimeMajorMinorPatchVersion
  • MicrosoftNETCoreAppRefMajorMinorPatchVersion
  • AspNetCoreRuntimeMajorMinorPatchVersion
  • AspNetCoreRefMajorMinorPatchVersion

None of these properties were ever defined (dangling since at least 2019), so the produced RPM had empty dependency versions, causing install failures on some machines.

The DEB path was unaffected because it consumes the *WithTilde outputs that are computed in the shared LinuxNativeInstallerDependencyVersions.targets.

Fix

  • Wire up the missing MajorMinorPatchVersion outputs in the shared LinuxNativeInstallerDependencyVersions.targets for the NETCore/ASP.NET targeting packs, and fix a copy/paste bug where AspNetCoreMajorMinorPatchVersion was assigned the 2-part MajorMinorVersion instead of the 3-part MajorMinorPatchVersion.
  • Point the four token replacements in GenerateRPMs.targets at the correctly-named, now-defined properties.

Reuses the existing shared infrastructure rather than duplicating it; no impact on DEB/PKG paths.

RPM dependency version tokens referenced MSBuild properties that were never defined (MicrosoftNETCoreAppRuntimeMajorMinorPatchVersion, MicrosoftNETCoreAppRefMajorMinorPatchVersion, AspNetCoreRuntimeMajorMinorPatchVersion, AspNetCoreRefMajorMinorPatchVersion), so generated RPMs had empty dependency versions and failed to install on some machines.

Wire up the missing MajorMinorPatchVersion outputs in the shared LinuxNativeInstallerDependencyVersions.targets (also fixing a copy/paste bug where AspNetCoreMajorMinorPatchVersion was assigned the 2-part MajorMinorVersion) and point GenerateRPMs.targets at the correctly-named properties. The DEB path already worked because it consumes the WithTilde outputs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 12, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes SDK RPM generation producing dependencies with empty package_version fields by ensuring the RPM token replacement properties are actually defined and correctly named in the shared Linux dependency-version calculation target.

Changes:

  • Exposes missing *MajorMinorPatchVersion outputs for the NETCore targeting pack and ASP.NET targeting pack in LinuxNativeInstallerDependencyVersions.targets.
  • Fixes a copy/paste mistake where AspNetCoreMajorMinorPatchVersion was incorrectly populated from MajorMinorVersion.
  • Updates GenerateRPMs.targets token replacements to reference the now-correct, defined MSBuild properties.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/redist/targets/LinuxNativeInstallerDependencyVersions.targets Adds/repairs MSBuild outputs for MajorMinorPatchVersion so RPM dependency versions are produced correctly.
src/redist/targets/GenerateRPMs.targets Points RPM config token replacements at the correct properties (avoids empty dependency versions).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants