This is the complete code-brick reference sample used by docs/AuthoringBricks.md, and the primary way to build a code brick from a checkout: it references src/Ashlar.Core.Domain by ProjectReference, so it needs no NuGet feed. Published packages pin ci/published-version (see docs/AuthoringBricks.md § Packages on nuget.org).
Prerequisites: a repository checkout and the .NET SDK (global.json pins the version). Run it from the repository root:
dotnet test samples/hello-brick/HelloBrick.Tests/HelloBrick.Tests.csprojExpected: the test project builds HelloBrick and its Ashlar.Core.Domain dependency, then the xUnit smoke test in HelloBrickTests.cs passes (ExecuteAsync returns Hello, <name>! in the message output).
The sample contains:
HelloBrick/HelloBrick.csproj— code-authored brick project (ProjectReferenceto../../../src/Ashlar.Core.Domain/Ashlar.Core.Domain.csproj).HelloBrick/HelloBrick.cs—public sealed class HelloBrick : DomainBrick(DomainBrickis aglobal usingalias forAshlar.Core.Domain.Bricks.Brick, supplied bysamples/Directory.Build.props).HelloBrick.Tests/HelloBrick.Tests.csproj— xUnit test project.HelloBrick.Tests/HelloBrickTests.cs— smoke test forExecuteAsync.
To scaffold a standalone brick outside the checkout instead, see the ashlar new brick and "Restoring Ashlar.Authoring" sections of docs/AuthoringBricks.md.