Pin Npgsql 8.0.3, System.Text.Json 8.0.5, Caching.Memory 8.0.1; enable NuGet lockfiles

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-22 23:26:49 +02:00
commit a15648db04
3 changed files with 15 additions and 3 deletions

7
Directory.Build.props Normal file
View file

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
</Project>

View file

@ -1,14 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src WORKDIR /src
COPY src/Bifrost.Web/Bifrost.Web.csproj src/Bifrost.Web/ COPY Directory.Build.props .
RUN dotnet restore src/Bifrost.Web/Bifrost.Web.csproj COPY src/Bifrost.Web/Bifrost.Web.csproj src/Bifrost.Web/packages.lock.json src/Bifrost.Web/
RUN dotnet restore src/Bifrost.Web/Bifrost.Web.csproj --locked-mode
COPY . . COPY . .
RUN dotnet publish src/Bifrost.Web/Bifrost.Web.csproj \ RUN dotnet publish src/Bifrost.Web/Bifrost.Web.csproj \
--configuration Release \ --configuration Release \
--output /app/publish \ --output /app/publish \
/p:UseAppHost=false /p:UseAppHost=false /p:RestoreLockedMode=true
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS runtime FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS runtime
WORKDIR /app WORKDIR /app

View file

@ -13,6 +13,10 @@
</PackageReference> </PackageReference>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" /> <PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<!-- Direct pins lift transitive packages past their advisories; the lockfile holds the result. -->
<PackageReference Include="Npgsql" Version="8.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>