# Microsoft.Web.Infrastructure

**Kind:** Service

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

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

NuGet package dependency

`Microsoft.Web.Infrastructure` is a NuGet package dependency declared by `Pams.Core.csproj` in the legacy project format. It supplies web infrastructure assemblies during NuGet restore and project build; application code accesses it through the .NET project reference rather than a JavaScript import.

## Diagram

```mermaid
sequenceDiagram
    participant Developer
    participant NuGet
    participant PamsCore as Pams.Core.csproj
    participant Build as Build Process

    Developer->>NuGet: Restore Microsoft.Web.Infrastructure
    NuGet-->>PamsCore: Resolve package assemblies
    PamsCore->>Build: Reference restored assemblies
    Build-->>Developer: Produce application output
```

## Usage

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

const projectFile = "Pams/Core/Pams.Core/Pams.Core.csproj";

execFileSync("nuget", ["restore", projectFile], {
  stdio: "inherit",
});

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

## AI Coding Instructions

- Keep `Microsoft.Web.Infrastructure` configured as a NuGet dependency in the legacy project file or its associated package configuration.
- Restore NuGet packages before building `Pams.Core.csproj`, especially in clean build environments.
- Do not add a JavaScript or TypeScript import for this package; it is consumed by the .NET build and runtime.
- Check package reference paths when moving the project or changing legacy NuGet package locations.
