abp icon indicating copy to clipboard operation
abp copied to clipboard

Support Central Package Management

Open MichelZ opened this issue 3 months ago • 7 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Description

It looks like Central Package Management is not properly supported. The packages in Directory.Packages.propsdo not get updated. The commandline properly detects CPM, and skips all package upgrades: [10:32:00 WRN] Package: Volo.Abp.LanguageManagement.Domain uses central package management. Skipped!

Would be nice if it could just upgrade the Directory.Packages.props file instead

Version

9.3.2

Operation System

Windows (Default)

Solution Configuration

No response

Other information

No response

MichelZ avatar Sep 04 '25 08:09 MichelZ

this may go even further.

what if you use variables instead of the version?

we always have some <abpVersion>9.3.2</abpVersion> variable that we use to reduce upgrade efforts.

I can provide an example if needed/ of interest

nebula2 avatar Sep 04 '25 10:09 nebula2

what if you use variables instead of the version?

That's actually a good idea, haven't thought about that yet. (I still think ABP should support updating CPM though)

MichelZ avatar Sep 04 '25 11:09 MichelZ

sure thing. i meant the combination :D

what if you use variables instead of the version?

That's actually a good idea, haven't thought about that yet. (I still think ABP should support updating CPM though)

nebula2 avatar Sep 04 '25 14:09 nebula2

this is what I mean

<Project>
  <PropertyGroup>
    <AbpVersion>9.2.3</AbpVersion>
    <LeptonXVersion>4.2.3</LeptonXVersion>
    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
  </PropertyGroup>
  <ItemGroup>
    <PackageVersion Include="Volo.Abp.PermissionManagement.Application" Version="$(AbpVersion)" />
    <PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX" Version="$(LeptonXVersion)" />
    <PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" />
    <!-- and so on -->
  </ItemGroup>
</Project>

nebula2 avatar Sep 04 '25 14:09 nebula2

Yes, I know, thx :)

MichelZ avatar Sep 04 '25 15:09 MichelZ

as an addition, just found this:

https://github.com/Webreaper/CentralisedPackageConverter

nebula2 avatar Sep 05 '25 07:09 nebula2

as an addition, just found this:

https://github.com/Webreaper/CentralisedPackageConverter

The Dotnet Upgrade Assistant in Visual Studio also supports this (there's also a command line version). https://devblogs.microsoft.com/dotnet/dotnet-upgrade-assistant-cpm-upgrade/

MichelZ avatar Sep 05 '25 08:09 MichelZ