How a Misplaced Project Reference Can Break CI While Local Tests Pass
A common but overlooked issue in .NET SDK-style builds occurs when a test project directly references an executable browser application just to access a simple, self-contained logic rule. While tests may pass locally, CI environments that disable web-asset processing can fail at build evaluation before any test even runs, because the browser project brings along complex build targets and workloads. The root cause is architectural: the test depends on the entire application head instead of only the capability it needs. The recommended fix is to move the shared rule into a neutral library that both the application and the test project already reference, eliminating the problematic dependency without adding new graph edges. Any such refactoring decision should be documented, explaining why the original location was invalid and under what future conditions the code placement should be revisited.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in