Skip to content

Microsoft.CSharp

reference
1 min readUpdated

Kind: Service

Source: Pams/API/Pams.API/Pams.API.csproj (line 1)

Part of: Pams

NuGet package dependency

Microsoft.CSharp is a NuGet package dependency declared by Pams.API.csproj. It supplies C# runtime support required by the Pams API project, including support used by dynamic C# language features.

Diagram

mermaid
sequenceDiagram
    participant Build as Build process
    participant Project as Pams.API.csproj
    participant NuGet as NuGet restore
    participant Package as Microsoft.CSharp
    participant API as Pams.API

    Build->>Project: Read package dependency
    Project->>NuGet: Request Microsoft.CSharp
    NuGet->>Package: Restore package
    Package-->>API: Make C# runtime support available

Usage

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

const projectFile = "Pams/API/Pams.API/Pams.API.csproj";
const projectContents = readFileSync(projectFile, "utf8");

if (!projectContents.includes('Include="Microsoft.CSharp"')) {
  throw new Error("Microsoft.CSharp package reference is missing.");
}

console.log("Microsoft.CSharp is referenced by Pams.API.");

AI Coding Instructions

  • Keep the Microsoft.CSharp package reference in Pams.API.csproj when code depends on C# dynamic language support.
  • Restore NuGet packages before building or running the Pams API project.
  • Change the package reference only alongside compatibility checks for the target framework and dependent code.
  • Treat this dependency as project configuration; application code does not import it from TypeScript or JavaScript.

Was this page helpful?

Download as PDF