# System

**Kind:** Service

**Source:** `Pams/Logic/Pams.Business/Pams.Business.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

`System` is a NuGet package dependency declared by `Pams.Business.csproj`. It supplies .NET base types and runtime APIs required when the Pams business project restores and builds in its legacy project format.

## Diagram

```mermaid
sequenceDiagram
    participant Developer
    participant BuildScript
    participant DotNet as dotnet CLI
    participant NuGet
    participant PamsBusiness as Pams.Business
    participant SystemPackage as System package

    Developer->>BuildScript: Run build command
    BuildScript->>DotNet: dotnet build Pams.Business.csproj
    DotNet->>NuGet: Restore package dependencies
    NuGet-->>DotNet: Resolve System package
    DotNet->>PamsBusiness: Compile project references
    PamsBusiness->>SystemPackage: Reference base .NET APIs
    DotNet-->>Developer: Return build result
```

## Usage

```ts
import { execFileSync } from "node:child_process";
import path from "node:path";

const projectFile = path.join(
  "Pams",
  "Logic",
  "Pams.Business",
  "Pams.Business.csproj",
);

execFileSync("dotnet", ["build", projectFile], {
  stdio: "inherit",
});
```

## AI Coding Instructions

- Keep the `System` dependency compatible with the target framework configured in `Pams.Business.csproj`.
- Restore NuGet packages before building when working from a clean checkout or after changing project dependencies.
- Preserve the legacy project-file package reference format unless the project is migrated as a coordinated change.
- Do not add JavaScript imports for `System`; it is resolved by the .NET build and NuGet restore process.
