novolis-msbuild / getting-started.md
Getting started
MSBuild props and targets
dotnetmsbuildnovolis
Novolis workspace
Repos that import novolis-governance/build/Novolis.Packaging.targets already expand LibraryReference. Declare the dependency and leave the path to the generated package map:
<ItemGroup>
<LibraryReference Include="Novolis.Math.Geometry" />
</ItemGroup>A sibling .csproj becomes a ProjectReference. A missing checkout becomes a PackageReference at 2026.1.*. Do not also PackageReference Novolis.MSBuild.LibraryReference; the first static-graph restore would not see the expanded items.
Outside the workspace
- Ensure
nuget.configincludes nuget.org and GitHub Packages (Novolis.*). - Add a central version (
2026.1.*on the Novolis line):
<PackageVersion Include="Novolis.MSBuild.LibraryReference" Version="2026.1.*" />- Reference it with
PrivateAssets=all:
<ItemGroup>
<PackageReference Include="Novolis.MSBuild.LibraryReference" PrivateAssets="all" />
</ItemGroup>- Declare dependencies:
<ItemGroup>
<LibraryReference Include="Novolis.Math.Geometry"
Version="2026.1.*"
ProjectPath="$(NovolisWorkspaceRoot)novolis-math\src\Novolis.Math.Geometry\Novolis.Math.Geometry.csproj" />
</ItemGroup>When ProjectPath exists, MSBuild emits a ProjectReference; otherwise a PackageReference (item Version, or LibraryReferenceDefaultVersion, package default *). Populate LibraryProjectMap when many items share paths.
Smoke tests
pwsh -File d:\novolis\novolis-msbuild\tests\LibraryReference.Smoke.ps1