Skip to main content

Create Server Csproj

Creates or updates the .csproj file for the .NET server.

Event Name

CreateServerCsproj

Event Params

export interface CreateServerCsprojParams extends EventParams {
propertyGroup: Record<string, string>;
packageReferences: {
include: string;
version: string;
includeAssets?: string;
privateAssets?: string;
}[];
}

Example

beforeCreateServerCsproj(
_: dotnetTypes.DsgContext,
eventParams: dotnet.CreateServerCsprojParams
) {
eventParams.packageReferences.push({
include: "Npgsql.EntityFrameworkCore.PostgreSQL",
version: "8.0.4",
});

return eventParams;
}