# Microsoft.CSharp

**Kind:** Service

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

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

NuGet package dependency

`Microsoft.CSharp` is a NuGet package dependency declared by the legacy-format `Pams.Business.csproj` project. It supplies C# runtime binder support for code in `Pams.Business` that uses dynamic C# operations.

## Diagram

```mermaid
flowchart LR
    Project[Pams.Business.csproj] --> Package[Microsoft.CSharp package]
    Package --> Binder[C# runtime binder]
    Binder --> DynamicCode[Dynamic C# operations]
```

## Usage

```ts
import { readFileSync } from "node:fs";

const projectFile = "Pams/Logic/Pams.Business/Pams.Business.csproj";
const projectXml = readFileSync(projectFile, "utf8");

const hasMicrosoftCSharp = projectXml.includes("Microsoft.CSharp");

if (!hasMicrosoftCSharp) {
  throw new Error("Microsoft.CSharp dependency is missing from Pams.Business.csproj");
}

console.log("Microsoft.CSharp dependency is declared.");
```

## AI Coding Instructions

- Keep `Microsoft.CSharp` declared in `Pams.Business.csproj` when code depends on dynamic C# binding behavior.
- Treat this dependency as project-level configuration rather than an application service with a runtime endpoint.
- Check the legacy project file format before changing package references or migrating dependency declarations.
- Avoid removing the package only because no direct namespace import appears in source files; dynamic operations can require the runtime binder.
