novolis-msbuild / getting-started.md
Getting started
MSBuild props and targets
dotnetmsbuildnovolis
Install the package
- Ensure
nuget.configincludes nuget.org and GitHub Packages (Novolis.*). - Add a central version (Novolis consumers:
2026.1.*):
<PackageVersion Include="Novolis.MSBuild.LibraryReference" Version="2026.1.*" />- Reference it with
PrivateAssets=all(Directory.Build.props is typical):
<ItemGroup>
<PackageReference Include="Novolis.MSBuild.LibraryReference" PrivateAssets="all" />
</ItemGroup>- Declare dependencies with
LibraryReferenceinstead of dual Package/Project blocks:
<ItemGroup>
<LibraryReference Include="Novolis.Math.Geometry"
Version="2026.1.*"
ProjectPath="$(NovolisWorkspaceRoot)novolis-math\src\Novolis.Math.Geometry\Novolis.Math.Geometry.csproj" />
</ItemGroup>When the .csproj at ProjectPath exists, MSBuild emits a ProjectReference; otherwise a PackageReference (Version or LibraryReferenceDefaultVersion, default *).
Optional: populate LibraryProjectMap (PackageId → path). Under a Novolis workspace, governance can copy NovolisPackageProject into LibraryProjectMap so map paths are available without repeating ProjectPath on every item.
Smoke tests
pwsh -File d:\novolis\novolis-msbuild\tests\LibraryReference.Smoke.ps1