diff --git a/src/DodoSSH.Api/Dockerfile b/src/DodoSSH.Api/Dockerfile index 4118a0c..8b4f826 100644 --- a/src/DodoSSH.Api/Dockerfile +++ b/src/DodoSSH.Api/Dockerfile @@ -2,9 +2,18 @@ # # docker build -f src/DodoSSH.Api/Dockerfile . # -# Directory.Build.props, Directory.Packages.props, NuGet.config and global.json all sit at -# the root and all four are load-bearing here — central package management means a csproj -# alone does not name a single version, and a build that cannot see them resolves nothing. +# Directory.Build.props, Directory.Build.targets, Directory.Packages.props, NuGet.config and +# global.json all sit at the root and all five are load-bearing here — central package +# management means a csproj alone does not name a single version, and a build that cannot see +# them resolves nothing. +# +# Directory.Build.targets is the one that is easy to forget, because leaving it out breaks +# nothing until the day it does: it pins the version of the trimmer the SDK adds to +# DodoSSH.Contracts and DodoSSH.Crypto by itself (see the comment there). Without it the restore +# below asks for whatever ILLink the image's SDK bundles, which matches the lock files only +# until .NET ships a servicing release — and then this image fails with NU1004 while ci.yml, +# which does see the pin, stays green. That is how it was found: sdk:10.0-noble moved to +# 10.0.401 (ILLink 10.0.12) and this build broke with no commit touching a package. # --------------------------------------------------------------------------------------- # Build @@ -26,7 +35,7 @@ WORKDIR /src # dependency change and by nothing else. Every project in DodoSSH.Api's reference closure # has to be here — restore walks ProjectReference, and a missing csproj fails the graph # rather than skipping a node. -COPY global.json NuGet.config Directory.Build.props Directory.Packages.props ./ +COPY global.json NuGet.config Directory.Build.props Directory.Build.targets Directory.Packages.props ./ COPY src/DodoSSH.Api/DodoSSH.Api.csproj src/DodoSSH.Api/ COPY src/DodoSSH.Api/packages.lock.json src/DodoSSH.Api/ COPY src/DodoSSH.Contracts/DodoSSH.Contracts.csproj src/DodoSSH.Contracts/