Kind: Service
Source: Pams/Data/Pams.Data/Pams.Data.csproj (line 1)
Part of: Pams
NuGet package dependency
Pams.Data.csproj defines NuGet package dependencies for the Pams.Data project. During package restore and build, it supplies the assemblies required by the data-layer code and records dependency versions in the project configuration.
Diagram
mermaidflowchart TD A[Developer or build process] --> B[Pams.Data.csproj] B --> C[NuGet package restore] C --> D[Resolved package assemblies] D --> E[Pams.Data build output]
Usage
tsimport { readFile } from "node:fs/promises";
const projectFile = "Pams/Data/Pams.Data/Pams.Data.csproj";
const projectXml = await readFile(projectFile, "utf8");
const packageReferences = [
...projectXml.matchAll(
/<PackageReference\s+Include="([^"]+)"(?:\s+Version="([^"]+)")?/g,
),
].map((match) => ({
name: match[1],
version: match[2] ?? "version defined elsewhere",
}));
console.log(packageReferences);
AI Coding Instructions
- Keep package dependency changes in
Pams.Data.csprojaligned with the dependency format already used by the project. - Verify package restore after changing dependency declarations or versions.
- Avoid adding data-access dependencies to unrelated projects when the dependency belongs in
Pams.Data. - Check for version conflicts with packages referenced by other Pams projects.
Was this page helpful?