feat: implement central package management and stabilize mobile build (#50)

This pull request implements **Central Package Management (CPM)** across the NexusReader solution to centralize package version definitions, improve package maintainability, and ensure security patch consistency. It also resolves compile issues in the mobile infrastructure and client projects.

### Key Changes

#### 1. NuGet Central Package Management (CPM)
- Created `Directory.Packages.props` in the solution root containing all solution-wide dependency versions (consolidating 48 packages).
- Pinned and secured `Microsoft.Bcl.Memory` to `v9.0.14` to resolve a known high-severity vulnerability (CVE-2026-26127).
- Stripped explicit `Version` attributes from `.csproj` files for the core library, web client, web host, UI shared, data access, and testing projects to inherit central version definitions.

#### 2. Mobile / MAUI Projects Stabilization
- **Workload Support & Locally Disabled CPM**: Disabled Central Package Management locally (`<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>`) in both `NexusReader.Infrastructure.Mobile.csproj` and `NexusReader.Maui.csproj` to preserve native MAUI workload package integration while cleanly referencing package versions manually.
- **Ambiguity Resolving**: Added using aliases for `FluentResults.Result` to eliminate compiler ambiguity conflicts between `Android.App.Result` and `FluentResults.Result` inside Android platform service implementations.
- **Missing Namespaces Fix**: Added explicit hosting imports (`using Microsoft.Maui; using Microsoft.Maui.Hosting;`) and ensured `Microsoft.Maui.Essentials` references resolve properly in the mobile context.

---

### Verification
- **Build**: Successfully built the entire solution with zero compilation errors (`dotnet build NexusReader.slnx --no-restore` -> `Liczba błędów: 0`).
- **Tests**: All 7 integration and unit tests run and pass successfully (`dotnet test NexusReader.slnx --no-restore`).

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #50
Reviewed-by: Marek Jaisński <jasins.marek@gmail.com>
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
This commit was merged in pull request #50.
This commit is contained in:
2026-05-21 17:42:29 +00:00
committed by Marek Jaisński
parent cb4b7d0052
commit 37bec89484
19 changed files with 227 additions and 92 deletions
+55
View File
@@ -0,0 +1,55 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="FluentResults" Version="4.0.0" />
<PackageVersion Include="Mapster" Version="10.0.7" />
<PackageVersion Include="Mapster.DependencyInjection" Version="10.0.7" />
<PackageVersion Include="MediatR" Version="12.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="10.0.7" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.7" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.5.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="10.0.7" />
<PackageVersion Include="Pgvector" Version="0.3.0" />
<PackageVersion Include="Pgvector.EntityFrameworkCore" Version="0.3.0" />
<PackageVersion Include="Microsoft.Extensions.Resilience" Version="10.5.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="10.0.7" />
<PackageVersion Include="GeminiDotnet.Extensions.AI" Version="0.23.0" />
<PackageVersion Include="Hangfire.AspNetCore" Version="1.8.23" />
<PackageVersion Include="Hangfire.PostgreSql" Version="1.21.1" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.7" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.7" />
<PackageVersion Include="Microsoft.ML.Tokenizers" Version="2.0.0" />
<PackageVersion Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="2.0.0" />
<PackageVersion Include="Neo4j.Driver" Version="6.1.1" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageVersion Include="Polly" Version="8.6.6" />
<PackageVersion Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageVersion Include="Qdrant.Client" Version="1.18.1" />
<PackageVersion Include="Stripe.net" Version="51.1.0" />
<PackageVersion Include="VersOne.Epub" Version="3.3.6" />
<PackageVersion Include="Microsoft.Bcl.Memory" Version="9.0.14" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.7" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="10.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="10.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="10.0.7" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="10.0.7" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="10.0.20" />
<PackageVersion Include="Microsoft.Maui.Essentials" Version="10.0.20" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
</ItemGroup>
</Project>