Skip to content

Add Nuke build project with Attach/Detach targets#38

Merged
jeremydmiller merged 1 commit intomainfrom
nuke-build
May 1, 2026
Merged

Add Nuke build project with Attach/Detach targets#38
jeremydmiller merged 1 commit intomainfrom
nuke-build

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

Mirrors the Marten Nuke build setup at ~/code/marten/build/.

Build infrastructure

  • build/build.csproj — Nuke build project (net10.0)
  • build/build.cs — All targets
  • build/Configuration.cs — Debug/Release enumeration
  • build.sh / build.cmd / build.ps1 — Wrapper scripts
  • .nuke/parameters.json — Solution path
  • Updated .gitignore and Directory.Packages.props (added Nuke.Common 9.0.4)

Available targets

  • Compile, Restore, Test, TestPolecat, TestAspnetcore, TestEfCore
  • Pack — packs all 4 NuGet packages (Polecat, AspNetCore, CodeGeneration, EntityFrameworkCore)
  • Docs, DocsBuild, PublishDocs, InstallMdSnippets
  • RebuildDb, InitDb
  • Attach / Detach — see below

Attach / Detach

Cross-repo dev workflow that mirrors Marten exactly:

./build.sh --target Attach

  1. Adds JasperFx, JasperFx.Events, Weasel.Core, Weasel.SqlServer, Weasel.EntityFrameworkCore from sibling repos (../jasperfx, ../weasel) to polecat.slnx under an Attached solution folder
  2. Removes the corresponding NuGet PackageReferences from Polecat, Polecat.EntityFrameworkCore, and Polecat.EntityFrameworkCore.Tests
  3. Adds ProjectReferences to those sibling projects in their place

./build.sh --target Detach

  1. Removes the sibling ProjectReferences
  2. Removes the projects from polecat.slnx
  3. Restores --prerelease NuGet PackageReferences

This makes it trivial to develop JasperFx or Weasel changes alongside Polecat without manually editing csproj files.

Test plan

  • dotnet build build/build.csproj succeeds
  • ./build.sh --target Help lists all targets including Attach and Detach
  • Attach invokes the right dotnet sln add / dotnet remove package sequence (verified via dry run)

🤖 Generated with Claude Code

Mirrors the Marten Nuke build setup (~/code/marten/build/). Adds:

- build/build.csproj — Nuke build project (net10.0)
- build/build.cs — Build targets: Compile, Test, TestPolecat,
  TestAspnetcore, TestEfCore, Pack, Docs, DocsBuild, PublishDocs,
  RebuildDb, InitDb, Attach, Detach, etc.
- build/Configuration.cs — Debug/Release enumeration
- build.sh / build.cmd / build.ps1 — Wrapper scripts
- .nuke/parameters.json — Solution path
- .gitignore — Ignore .nuke/temp and results/

The Attach/Detach targets mirror Marten's:

  Attach  — Switches Polecat to use ProjectReferences pointing at
            sibling repos (~/code/jasperfx, ~/code/weasel) and removes
            the corresponding NuGet PackageReferences. Adds the linked
            projects to the polecat.slnx under an "Attached" folder.

  Detach  — Inverse: removes ProjectReferences, removes attached
            projects from the solution, and restores the NuGet
            PackageReferences (--prerelease) for JasperFx, JasperFx.Events,
            Weasel.SqlServer, Weasel.EntityFrameworkCore.

Used for cross-repo development when working on JasperFx or Weasel
changes alongside Polecat.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit a2ee8b5 into main May 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant