Bitbound.SystemAbstractions 1.0.7

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

Bitbound.SystemAbstractions

Operating system abstractions for .NET services: file system, processes, system environment, and the Windows registry. Interfaces are public, implementations are internal, and everything is registered through ServiceCollectionExtensions.

Quick Start

Install the package.

dotnet add package Bitbound.SystemAbstractions

Register the abstractions on your IServiceCollection.

using Bitbound.SystemAbstractions;

var services = new ServiceCollection();
services.AddSystemAbstractions();

Resolve and use them through the interfaces.

public class BackupService(IFileSystem fileSystem, IProcessManager processes)
{
  public async Task RunAsync()
  {
    if (fileSystem.FileExists("/data/state.json"))
    {
      var result = await processes.GetProcessOutput("dotnet", "--version");
      if (result.IsSuccess)
      {
        Console.WriteLine("dotnet version: " + result.Value);
      }
    }
  }
}

The companion test package provides in-memory fakes and xUnit helpers.

dotnet add package Bitbound.SystemAbstractions.TestUtilities
using Bitbound.SystemAbstractions.FileSystem;

var fileSystem = new FakeFileSystem();
fileSystem.AddFile("/data/config.json", """{"port": 5000}""");

var services = new ServiceCollection();
services.AddSystemAbstractions();
services.AddSingleton<IFileSystem>(fileSystem);

// Inject into your service and assert against the fakes.

AddSystemAbstractions() registers:

Service Registration Notes
IFileSystem AddFileSystem() Files, directories, drives, streams, zip extraction, which/where.exe path resolution.
IFileAccessPermissions AddFileSystem() Windows ACLs by WellKnownSidType, or UnixFileMode on Linux/macOS.
IProcessManager AddProcesses() Start, inspect, and wait on processes. IProcess wraps System.Diagnostics.Process.
ISystemEnvironment AddSystemEnvironment() Platform, RID, process id, startup paths, well-known directories.
IRegistryManager AddRegistry() Windows only. Throws PlatformNotSupportedException elsewhere, and AddSystemAbstractions() skips it.

The registry abstractions use their own RegistryHive, RegistryView, and RegistryValueKind enums, so the contracts are platform-neutral and can be faked on any operating system.

Returning failures instead of throwing

IFileSystem.ResolveFilePath and IProcessManager.GetProcessOutput return Result/Result<T> from Bitbound.SystemAbstractions.Primitives, which carry IsSuccess, Reason, and the Exception that produced the failure.

var resolved = await fileSystem.ResolveFilePath("dotnet");
if (!resolved.IsSuccess)
{
  logger.LogWarning("dotnet is not on the path: {Reason}", resolved.Reason);
}

Testing

Use the companion Bitbound.SystemAbstractions.TestUtilities package, which provides FakeFileSystem and FakeRegistry.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bitbound.SystemAbstractions:

Package Downloads
Bitbound.SystemAbstractions.TestUtilities

In-memory fakes (file system, Windows registry), platform-specific xUnit facts/theories, and an xUnit-backed ILogger for testing services that depend on Bitbound.SystemAbstractions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.7 129 9/8/2026
1.0.5 114 9/8/2026