Xake.Hermetic.Dotnet 0.1.0.22

dotnet add package Xake.Hermetic.Dotnet --version 0.1.0.22
                    
NuGet\Install-Package Xake.Hermetic.Dotnet -Version 0.1.0.22
                    
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="Xake.Hermetic.Dotnet" Version="0.1.0.22" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xake.Hermetic.Dotnet" Version="0.1.0.22" />
                    
Directory.Packages.props
<PackageReference Include="Xake.Hermetic.Dotnet" />
                    
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 Xake.Hermetic.Dotnet --version 0.1.0.22
                    
#r "nuget: Xake.Hermetic.Dotnet, 0.1.0.22"
                    
#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 Xake.Hermetic.Dotnet@0.1.0.22
                    
#: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=Xake.Hermetic.Dotnet&version=0.1.0.22
                    
Install as a Cake Addin
#tool nuget:?package=Xake.Hermetic.Dotnet&version=0.1.0.22
                    
Install as a Cake Tool

Xake.Hermetic.Dotnet

Reproducible .NET builds for Xake: lock files, package restore, CycloneDX SBOMs, verification of built binaries, deterministic packing and signing.

The package builds on the csc {} task of Xake (Xake.Dotnet; Xake 3.4.0.21 or later, below 4.0) and adds what a build needs to be repeatable and auditable: a lock file that records exactly what the compiler is handed, with the SHA-256 of every reference, analyzer and the compiler itself; a restore of the packages that lock names; an SBOM generated from the lock; and the release steps after the compile. It is a 0.x preview: names may still change between minor versions.

Usage

#r "nuget: Xake"
#r "nuget: Xake.Hermetic.Dotnet"

open Xake
open Xake.Dotnet
open Xake.Hermetic.Dotnet

Compile gated by a lock (recorded on the first build, enforced afterwards):

"out/app.dll" ..> csc { targetfwk "net472"; src !!"src/*.cs"; lock "locks/app.json" }

The same with the resolved compilation in hand:

"out/app.dll" ..> recipe {
    let! c = csc { targetfwk "net472"; src !!"src/*.cs"; resolve }
    do! Lock.build "locks/app.json" c
}

Restore the packages a lock names, checked against their recorded sha512:

let! doc = Lock.load "locks/app.json"
do! Lock.restore Restore.Options.Default doc

An SBOM for an assembly built from a lock entry:

let bom = Sbom.forAssembly (DotNetFwk.nugetRoot ()) (Lock.entry "app" doc) "out/app.dll"
File.WriteAllText ("out/app.cdx.json", Sbom.cycloneDx bom)

A signing rule (the signer is yours; Sign.fakeSigner exists for tests only):

sign {
    target "signed/(name:*).dll"
    input (fun t -> "out" </> Path.GetFileName t)
    certificate (Sign.Thumbprint "...")
    signer mySigner
}

See the documentation for the lock format, Project.import (locks from existing .csproj files), verification and packing.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.22 67 10/1/2026