Skip to content

Conversation

@NikolaMilosavljevic
Copy link
Member

Fixes: dotnet/source-build#4895

Changes in src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj are fixing package dependency versions.

Changes in Directory.Build.props are fixing package versions, to allow inclusion of prerelease version suffix. VersionSuffix is used in packaging infra: https://github.com/dotnet/arcade/blob/ae3c938af5df4a2db45ded37dd05608ce59d8e5e/src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.build.targets#L36

However due to a bug in Directory.Build.Props, arcade's BeforeCommonTargets.targets are not imported early enough - see dotnet/source-build#4895 (comment). The fix is to preserve the existing values of CustomBeforeMicrosoftCommonTargets and CustomBeforeMicrosoftCommonCrossTargetingTargets properties, and prepend the custom targets used by this repo.

Due to the above change in Directory.Build.Props some projects are only now evaluating all arcade properties correctly, which caused a build issue in two shipping tools projects (Microsoft.dotnet-openapi.csproj and dotnet-sql-cache.csproj), due to PackAsToolShimRuntimeIdentifier being assigned Windows runtime identifiers in Linux builds - which of course won't work.

Therefore I have also had to make a third change, in src/Tools/Directory.Build.targets to fix the evaluation of PackAsToolShimRuntimeIdentifiers in tools projects.

Copilot AI review requested due to automatic review settings February 18, 2025 05:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (3)
  • Directory.Build.props: Language not supported
  • src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj: Language not supported
  • src/Tools/Directory.Build.targets: Language not supported

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 18, 2025
@NikolaMilosavljevic NikolaMilosavljevic changed the title Fix package versioning Fix installer package versioning Feb 18, 2025
@NikolaMilosavljevic
Copy link
Member Author

Some checks are timing out. Will rerun them.

cc @wtgodbe

@wtgodbe wtgodbe enabled auto-merge (squash) February 18, 2025 20:24
@wtgodbe wtgodbe merged commit 6df1592 into dotnet:main Feb 18, 2025
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview2 milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VMR] aspnetcore packages produced in VMR have incorrect prerelease versioning

5 participants