NuGate.Build 0.1.2

dotnet add package NuGate.Build --version 0.1.2
                    
NuGet\Install-Package NuGate.Build -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NuGate.Build" Version="0.1.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NuGate.Build" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="NuGate.Build">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NuGate.Build --version 0.1.2
                    
#r "nuget: NuGate.Build, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NuGate.Build@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NuGate.Build&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=NuGate.Build&version=0.1.2
                    
Install as a Cake Tool

NuGate.Build

A dependency age gate for NuGet, enforced at build time. The build fails if any resolved package version — direct or transitive — was published less than N days ago (default 7), unless explicitly allowlisted.

One line in Directory.Build.props gates every project in the repo, dev machines included:

<ItemGroup>
  <PackageReference Include="NuGate.Build" Version="0.1.2" PrivateAssets="all" />
</ItemGroup>

For CI, consider NuGate.Tool as well — it runs nugate check between restore and build, before any package's MSBuild targets can execute.

Configure — nugate.json at the repo root

{
  "minAgeDays": 7,
  "mode": "enforce",
  "onApiFailure": "fail",
  "allow": [
    { "id": "SomePackage", "version": "3.1.4", "expires": "2026-08-01", "reason": "hotfix" }
  ],
  "exemptPrefixes": ["MyCompany."]
}

No config file means the defaults (7 days, enforce, fail closed). Allowlist entries can carry an expiry so exceptions don't fossilize; exemptPrefixes covers internal packages that aren't on nuget.org.

What this does / does not do

NuGate enforces a dependency age policy. That's all it does, and it does it deliberately.

It does not detect malware, scan for vulnerabilities, or prevent attacks. A 30-day-old compromised package passes the gate by design. Cooldowns shrink the window in which freshly poisoned package versions can reach you — they don't close it.

Ages come from the immutable nuget.org catalog created timestamp — not the registration published field, which nuget.org resets when a version is unlisted. Unlisted versions are flagged regardless of age.


Docs & guide: nugate.dev · Source: GitHub · Apache-2.0 © Abel Solutions · Not affiliated with Microsoft or the NuGet project.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 0 7/16/2026
0.1.1 0 7/16/2026
0.1.0 0 7/15/2026