SkillAgentSearch skills...

packaging

Project files, central package management, multi-targeting, and slnx registration

Install / Use

npx skills add MJWherry/Lyo

Installs into whichever agent you are using.

About this skill
📐

Cursor Rules

Cursor IDE rules (v2)

Quality Score

57/100

Supported Platforms

Cursor

description: Project files, central package management, multi-targeting, and slnx registration globs: /*.csproj,/Directory.Packages.props,**/*.slnx alwaysApply: false

Packaging & Project Files

Central Package Management (CPM)

  • PackageReference entries in csproj files must have NO Version attribute. Versions live only in Lyo.Net/Directory.Packages.props as minimum ranges, e.g. <PackageVersion Include="Foo" Version="[1.2.3,)"/>.
  • When adding a dependency: add the PackageVersion to Directory.Packages.props (alphabetical order), then reference it version-less in the csproj.

Minimal csproj shape

Lyo.Net/Directory.Build.props already sets LangVersion=latest, Nullable=enable, ImplicitUsings=enable, packaging metadata, and doc generation — never repeat these per project. A library csproj declares only:

<PropertyGroup>
    <TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
    <Description>...</Description>
    <PackageTags>...</PackageTags>
</PropertyGroup>

plus references and <InternalsVisibleTo Include="Lyo.{X}.Tests"/> when internals are tested. Directory.Build.props / Directory.Build.targets pack README.md automatically when that file exists — do not repeat PackageReadmeFile or a None pack item.

Multi-targeting

  • Reusable libraries multi-target netstandard2.0;net10.0. PolySharp (wired in Directory.Build.targets) polyfills modern language features on netstandard2.0, so modern syntax is fine everywhere.
  • net10-only BCL APIs need #if guards or conditional ItemGroups (see Lyo.Net/Core/Common/Lyo.Common/Lyo.Common.csproj for the conditional System.Text.Json/System.Memory pattern).
  • App hosts, Blazor components, tests, and benchmarks target net10.0 only.

Solution registration

  • Every new project needs a <Project Path="..."/> entry inside the matching <Folder> element of Lyo.Net/Lyo.slnx. Solution folders mirror disk paths; create a new <Folder Name="/Area/Group/"> if none exists.
  • Package documentation source of truth is docs.json (schema: docs/catalog/schema/package.schema.json). When adding or changing public APIs, update that package’s docs.json — do not hand-edit generated README.md files. Regenerate READMEs via scripts/docs/project-docs.py (e.g. render). Never run extract (it overwrites JSON from README and is lossy).
  • Every package still ships a generated README.md (packed into the NuGet package via PackageReadmeFile).

Related Skills

View on GitHub
GitHub Stars0
CategoryDevelopment
UpdatedNaNy ago
Forks0

Security Score

68/100

Audited on Invalid Date

2 medium1 low