fix(ci): copy the OpenRouter.Net submodule into the Docker build #116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/dockerfile-openrouter-submodule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
Build and pushjob fails after #113: thedotnet publishstep errors withMSB9008: referenced project ../../external/OpenRouter.Net/src/OpenRouter.Net/OpenRouter.Net.csproj does not exist→CS0246: The type or namespace name 'OpenRouter' could not be found.Cause
deploy/Dockerfilecopies each referenced submodule individually (to keep the NuGet-restore layer independent of source changes), not a blanketCOPY external/. #113 added a ProjectReference fromKagura.Infrastructureto the newOpenRouter.Netsubmodule but never taught the Dockerfile about it — so the build context had the csproj reference but not the files. Local builds pass because a full checkout has every submodule on disk; only the Docker context is selective.Fix
Two lines, mirroring the existing NovelAI.ImageGen treatment:
OpenRouter.Net'sDirectory.Build.props+Directory.Packages.propsand the baseOpenRouter.Net.csproj.external/OpenRouter.Net/src/.Only the base client is referenced (its csproj has no project references, and central package versions resolve from the submodule's own props), so the restore-layer copy is minimal.
Verification
No Docker locally, so I reproduced the build stage faithfully: staged only the files the Dockerfile copies (with the fix) into a clean directory — no
.git, nothing else — and ran the samedotnet publish. It succeeds:OpenRouter.Net -> …/OpenRouter.Net.dllandKagura.Server -> …/Kagura.Server.dll, no MSB9008/CS0246.🤖 Generated with Claude Code
Summary
Summary
Coverage
Kagura.BlazorAdapter - 88.8%
Kagura.Domain - 94.6%
D04ADFED3A21D401C2764A1D17367E35BEB556CBB3B4B0B74__NonSlugChars_0
Kagura.Infrastructure - 98.4%
n
on
Kagura.Kernel - 90%
Kagura.Server - 84.6%
Kagura.UI - 94.7%
Kagura.UseCases - 95.9%
OpenRouter.Net - 16.5%
11780951F121D31931A9902EBCB3C836981FE5704E53C5056__Base64DataUriPattern_0