Regira.System 6.1.2

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

Regira System

Regira System provides process execution helpers, application hosting utilities, background task management, Windows Service support, and .csproj project parsing.

Projects

Project Package Purpose
Common.System Regira.System Process execution helpers
System.Hosting Regira.System.Hosting Host config, background queues, Windows Service
System.Projects Regira.System.Projects Parse and manage .csproj files

See Web for the full System.Hosting API reference and examples.

Installation

<PackageReference Include="Regira.System" Version="6.*" />
<PackageReference Include="Regira.System.Hosting" Version="6.*" />
<PackageReference Include="Regira.System.Projects" Version="6.*" />

Process execution (Regira.System)

IProcessHelper / ProcessHelper

Run shell commands or executables and capture their output.

public interface IProcessHelper
{
    IProcessOutput ExecuteCommand(string command, bool waitForOutput = false);
    IProcessOutput ExecuteFile(string filename, bool waitForOutput = false, string? arguments = null);
}

ProcessHelper is the default implementation. ExecuteCommand writes the command to a temporary .bat file (in Options.TempFolder, or a generated temp directory) and executes it; ExecuteFile starts the given executable directly. Pass waitForOutput: true to capture stdout/stderr.

IProcessHelper processHelper = new ProcessHelper(new ProcessHelper.Options
{
    TempFolder = @"C:\Temp"   // optional; holds the temporary .bat file
});

IProcessOutput result = processHelper.ExecuteCommand("dotnet --version", waitForOutput: true);
Console.WriteLine(result.Output);     // captured stdout
Console.WriteLine(result.ExitCode);   // process exit code

IProcessOutput / ProcessOutput

public interface IProcessOutput
{
    string? Output { get; set; }
    string? Error { get; set; }
    int ExitCode { get; set; }
}

Output and Error are only populated when waitForOutput is true.

ProcessHelperExtensions

Open a path or an IBinaryFile with the OS default application (a file without a path is written to a temp file first):

IProcessHelper processHelper = new ProcessHelper();
IBinaryFile binaryFile = new BinaryFileItem { FileName = "invoice.pdf" };

processHelper.OpenFileByOS(@"C:\docs\invoice.pdf");
processHelper.OpenFileByOS(binaryFile);

System.Hosting — quick reference

WebHostOptions (appsettings "Hosting" section)

{
  "Hosting": {
    "ServiceName": "MyApi",
    "LocalPort": 5000,
    "EnableSwagger": true,
    "EnableCors": false,
    "RoutePrefix": "api/v1"
  }
}
var builder = WebApplication.CreateBuilder();
builder.Host.UseWebHostOptions();

Background task queue

services.UseBackgroundQueue();
// or typed:
services.UseBackgroundQueue<MyTask>();

Windows Service installer

var app = WebApplication.Create();
app.AddWindowsServiceInstaller(new WindowsServiceOptions
{
    ServiceName        = "MyApi",
    InstallFilename    = "install.bat",
    UninstallFilename  = "uninstall.bat"
});

Generates install.bat / uninstall.bat scripts using sc.exe.


System.Projects

Parse, inspect, and update .csproj files programmatically. Useful for tooling, code-gen scripts, and build automation.

ProjectParser

var parser = new ProjectParser();

XDocument xml = XDocument.Load("MyLib.csproj");
Project proj  = parser.Parse(xml);

Console.WriteLine(proj.Id);               // PackageId
Console.WriteLine(proj.Version);          // "5.0.3"
Console.WriteLine(string.Join(", ", proj.TargetFrameworks!)); // "net8.0, net10.0"

Update and write back:

proj.Version = new Version("5.1.0");
XDocument updated = parser.Update(xml, proj);
updated.Save("MyLib.csproj");

ProjectService

// ITextFileService comes from the Regira.IO.Storage package
var service = new ProjectService(parser, textFileService);

Project       single  = await service.Details("src/MyLib/MyLib.csproj");
IEnumerable<Project> all = await service.List();     // scans root recursively

await service.Save(proj);   // writes changes back to disk

ProjectManager + ProjectTree

Build a dependency tree from all projects in the solution:

var manager = new ProjectManager(projectService);
ProjectTree tree = await manager.BuildTree();

// tree is a TreeList<Project> — see TreeList docs for navigation
var roots = tree.Roots;                              // projects with no dependencies
var leaves = tree.GetBottom().Select(n => n.Value.Id);  // projects nobody depends on

ProjectTree extends TreeList<Project> — see TreeList docs for the full navigation API.

License

Apache License 2.0 — this package contains no license validation and no runtime limits. See LICENSE. A few companion packages are commercially licensed with a free tier; see the licensing overview.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 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 (5)

Showing the top 5 NuGet packages that depend on Regira.System:

Package Downloads
Regira.DAL.MongoDB

MongoDB data access layer for Regira using the official MongoDB driver.

Regira.System.Hosting

Generic Host and Windows Service support extensions for Regira.

Regira.DAL.PostgreSQL

PostgreSQL data access layer for Regira using Dapper and Npgsql.

Regira.System.Projects

Project file and solution structure utilities for Regira system tools.

Regira.Media.FFMpeg

Video and audio processing using FFMpegCore for Regira.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.1.2 107 8/16/2026
6.1.1 125 8/12/2026
6.1.0 178 8/10/2026