There is a newer version of this package available.
See the version list below for details.
dotnet add package Guard.NET --version                
NuGet\Install-Package Guard.NET -Version                
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="Guard.NET" Version="" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Guard.NET --version                
#r "nuget: Guard.NET,"                
#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.
// Install Guard.NET as a Cake Addin
#addin nuget:?package=Guard.NET&version=

// Install Guard.NET as a Cake Tool
#tool nuget:?package=Guard.NET&version=                

A simple library that facilitates runtime checks of code and allows to define preconditions and invariants within a method.

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (37)

Showing the top 5 NuGet packages that depend on Guard.NET:

Package Downloads

Provides capability to improve telemetry with Serilog in applications


Provides capability to use correlation in applications


Contains core functionality for Arcus.Security


Provides capabilities for easily integrating logging when building Web APIs running in Azure.


Provides core capabilities for easily integrating logging when building applications running in Azure.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Guard.NET:

Repository Stars
Bringing Azure Monitor metrics where you need them.
Version Downloads Last updated
3.0.0 350,466 8/26/2022
2.0.0 410,630 10/5/2021
1.2.0 732,376 8/24/2018
1.0.1 1,339 8/23/2018 5,075 6/25/2018 1,365 6/19/2018
1.0.0 2,251 4/10/2018

     - issue with Guard.NotNull/NotNullOrEmpty/NotLessThan/NotGreaterThan overload obstruction:
     They optionally allow you to specify a guard message - however, it is being enforced by the compiler because there is an overload which is interfering.