Kind: Module
Source: libs
.NET project in solution
The libs module is a .NET project within the solution that contains shared library code intended for reuse by other projects. It centralizes common domain logic, utilities, and abstractions so application projects can reference a consistent implementation.
Diagram
mermaidgraph TD Solution[".NET Solution"] --> Libs["libs<br/>Shared .NET Project"] Libs --> SharedLogic["Shared Domain Logic"] Libs --> Utilities["Utilities & Helpers"] Libs --> Contracts["Shared Contracts / Models"] Application["Application Projects"] --> Libs
Usage
tsimport { execFileSync } from "node:child_process";
// Build the shared .NET library before building or running
// projects that reference it.
execFileSync(
"dotnet",
["build", "libs/libs.csproj", "--configuration", "Release"],
{ stdio: "inherit" }
);
AI Coding Instructions
- Keep reusable, application-agnostic logic in
libs; avoid placing host-specific configuration or UI concerns here. - Preserve public API compatibility when changing shared models, interfaces, or utility methods because multiple projects may reference this project.
- Add the
libsproject as a project reference from consuming.csprojfiles rather than copying shared source files. - Run
dotnet buildfor the solution after changes to catch dependency and compilation issues across all consumers.
Referenced By
atloria(MODULE_DECLARES)
Was this page helpful?