![]() |
VOOZH | about |
dotnet add package GiantCroissant.Lunar.Build.NuGet --version 0.1.1-ci.113
NuGet\Install-Package GiantCroissant.Lunar.Build.NuGet -Version 0.1.1-ci.113
<PackageReference Include="GiantCroissant.Lunar.Build.NuGet" Version="0.1.1-ci.113" />
<PackageVersion Include="GiantCroissant.Lunar.Build.NuGet" Version="0.1.1-ci.113" />Directory.Packages.props
<PackageReference Include="GiantCroissant.Lunar.Build.NuGet" />Project file
paket add GiantCroissant.Lunar.Build.NuGet --version 0.1.1-ci.113
#r "nuget: GiantCroissant.Lunar.Build.NuGet, 0.1.1-ci.113"
#:package GiantCroissant.Lunar.Build.NuGet@0.1.1-ci.113
#addin nuget:?package=GiantCroissant.Lunar.Build.NuGet&version=0.1.1-ci.113&prereleaseInstall as a Cake Addin
#tool nuget:?package=GiantCroissant.Lunar.Build.NuGet&version=0.1.1-ci.113&prereleaseInstall as a Cake Tool
Streamlined NuGet build automation for the Lunar Build system. This module exposes small, reusable component APIs and thin orchestration workflows you can call from NUKE targets.
INuGetPackager β Engines for PackComponents and PackMeta using NUKE DotNetPack.IMetaPackWorkflow β Orchestrates meta packaging (sync built packages β restore meta with packageSourceMapping β pin dependency versions to GitVersion β build/pack meta).IComponentPackWorkflow β Orchestrates component pre-build (analyzers off) and packing.INuGetPublisher β Push packages (and symbols) with skip-duplicate and API key support.ILocalFeedSync β Copy built .nupkg to one or more local repositories in flat/hierarchical/both layouts.IArtifactLayout β Compute artifact directory layout (packages, reports, logs) under _artifacts/{version}.Call the workflows from thin NUKE targets.
using Lunar.Build.NuGet.Api;
using Nuke.Common;
using Nuke.Common.IO;
partial class Build
{
const string DisableGitVersionProp = "DisableGitVersion";
Target Pack => _ => _
.Executes(() =>
{
// Discover component projects and compute output dir (not shown here)
var projects = /* glob your component csproj files */ Array.Empty<AbsolutePath>();
var output = /* e.g. build/_artifacts/{GitVersion}/nuget-packages */ RootDirectory / "build/_artifacts/local/nuget-packages";
var useLocalNfun = (Environment.GetEnvironmentVariable("UseLocalNfunProjectReferences") ?? "")
.Equals("true", StringComparison.OrdinalIgnoreCase);
var disableGitVersion = Environment.GetEnvironmentVariable(DisableGitVersionProp);
var version = GitVersion?.SemVer;
var props = new Dictionary<string, string>
{
["RunAnalyzersDuringBuild"] = "false",
["RunAnalyzersDuringCompilation"] = "false",
["EnableNETAnalyzers"] = "false",
["EnforceCodeStyleInBuild"] = "false",
["TreatWarningsAsErrors"] = "false",
["ContinuousIntegrationBuild"] = "true",
["UpdateVersionProperties"] = "false",
[useLocalNfun ? "UseLocalNfunProjectReferences" : "ForceNfunPackageReferences"] = "true"
};
var env = new Dictionary<string, string>();
if (!string.IsNullOrWhiteSpace(disableGitVersion)) env[DisableGitVersionProp] = disableGitVersion!;
var workflow = new ComponentPackWorkflow();
workflow.Execute(new ComponentPackRequest
{
Projects = projects,
DisableAnalyzers = true,
BuildProperties = props,
EnvironmentVariables = env,
PackConfig = new PackConfig
{
Configuration = "Release",
OutputDirectory = output,
NoRestore = true,
NoBuild = true,
ContinuousIntegrationBuild = true,
DisableAnalyzers = true,
Version = version,
PackageVersion = version,
AdditionalProperties = props,
EnvironmentVariables = env
}
});
});
}
Pack meta with pinned dependency versions to the current GitVersion and restore from the synced local feed:
using Lunar.Build.NuGet.Api;
partial class Build
{
Target PackMeta => _ => _
.DependsOn(Pack) // ensure components built
.Executes(() =>
{
var metaProject = RootDirectory / "build/nuke/Lunar.Build.csproj";
var builtPackages = RootDirectory / "build/_artifacts/{GitVersion}/nuget-packages"; // resolve as needed
var localRepo = RootDirectory / "packages/nuget-repo"; // workspace feed
var version = GitVersion?.SemVer;
var workflow = new MetaPackWorkflow();
workflow.Execute(new MetaPackRequest
{
MetaProjectFile = metaProject,
BuildPackagesDirectory = builtPackages,
LocalRepositoryDirectory = localRepo,
Configuration = "Release",
Version = version,
DisableAnalyzers = true,
EnvironmentVariables = new Dictionary<string, string>
{
["DisableGitVersion"] = "1"
}
});
});
}
DotNetPack writes .nupkg (typically build/_artifacts/{GitVersion}/nuget-packages).packages/nuget-repo/ is always included to support meta restore.hierarchical | flat | both for local repo sync topology.true to opt into local project references for Nfun adapter during dev.true to force package consumption mode even when sibling repos exist locally (keeps CI/local parity).1 to disable GitVersion during local test runs.Meta pinning and local feed (per docs/guides/nuget-local-feed-and-meta-pinning.md):
PackageReference versions are pinned to $(MetaDependenciesVersion), which we set to GitVersion.SemVer during PackMeta.packages/nuget-repo/ and restore meta using a generated nuget.config with packageSourceMapping so GiantCroissant.* and Lunar.* resolve from the local feed.NoRestore=true is used for the meta build/pack phases to avoid re-evaluating sources.This preserves CI determinism while allowing local dry-runs without CI minutes.
packages/nuget-repo/ contains the just-built component packages. The meta workflow copies any missing .nupkg from the build output before restore.VersionOverride metadata to bind a concrete version when CPVM discovery is flaky.nuget.config explicitly maps GiantCroissant.*/Lunar.* to the workspace local-packages source, preventing fallbacks.The previous service-oriented implementation (services, options, validators, DI extensions, etc.) remains in this folder but is excluded from compilation and packaging. This preserves history and reference material without increasing package surface area.
Services, Options, DependencyInjection, Interfaces (except INuGetRepositoryComponent), Components (compiled only INuGetLocalRepoSyncComponent), Common, NugetPackage, Validation, PreBuild, PostBuild, _Generated.IWorkspaceNuGetComponent is deprecated; still compiled for backward compatibility. Prefer INuGetRepositoryComponent.If you still need the old behavior, consider copying the relevant code into your build as internal utilities rather than re-enabling it in this package.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on GiantCroissant.Lunar.Build.NuGet:
| Package | Downloads |
|---|---|
|
GiantCroissant.Lunar.Build
Meta-package that depends on the Lunar Build component packages for one-line install. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.1-ci.113 | 180 | 10/7/2025 |
| 0.1.1-ci.112 | 170 | 10/7/2025 |
| 0.1.1-ci.111 | 268 | 9/15/2025 |
| 0.1.1-ci.110 | 263 | 9/15/2025 |
| 0.1.1-ci.109 | 260 | 9/15/2025 |
| 0.1.1-ci.108 | 256 | 9/15/2025 |
| 0.1.1-ci.107 | 255 | 9/15/2025 |
| 0.1.1-ci.104 | 238 | 9/15/2025 |
| 0.1.1-ci.90 | 176 | 9/8/2025 |
| 0.1.1-ci.40 | 167 | 9/6/2025 |
| 0.1.1-ci.21 | 212 | 9/4/2025 |
| 0.1.1-ci.20 | 196 | 9/3/2025 |
| 0.1.1-chore-ci-pack-mobile-... | 77 | 9/4/2025 |
NuGet packaging components with repository management and publishing workflows for Nuke build system.