StageKit.Runtime 0.2.0

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

StageKit.Runtime

Logo

License GitHub repo size Code size Nuget GitHub Sponsors

StageKit.Runtime provides runtime and entry-application helpers for StageKit libraries and .NET apps.

Features

  • Entry assembly metadata helpers through EntryApplication
  • Process and executable path discovery
  • Runtime identifier helper
  • .NET single-file, Linux AppImage, Linux Flatpak, and macOS .app bundle detection
  • Formatted application and loaded-assembly diagnostics
  • Runtime, process, and entry-application diagnostic reports
  • Best-effort application relaunch helper

Install

dotnet add package StageKit.Runtime

Requirements

  • .NET 8 or newer
  • C# latest language version

EntryApplication

Use EntryApplication to inspect the process entry application and deployment shape.

using StageKit.Runtime;

Console.WriteLine(EntryApplication.AssemblyTitle);
Console.WriteLine(EntryApplication.AssemblyVersionString);
Console.WriteLine(EntryApplication.GenericRuntimeIdentifier);
Console.WriteLine(EntryApplication.ExecutablePath);
Console.WriteLine(EntryApplication.BundleType);

Capture a diagnostics block:

Console.WriteLine(EntryApplication.ApplicationInfo);
Console.WriteLine(EntryApplication.FormattedLoadedAssemblies);

RuntimeDiagnostics

Use RuntimeDiagnostics when you want a combined report for logs, support bundles, or crash reports.

using StageKit.Runtime;

Console.WriteLine(RuntimeDiagnostics.GetReport());
Console.WriteLine(RuntimeDiagnostics.GetReport(includeLoadedAssemblies: true));

Dictionary<string, string?> info = RuntimeDiagnostics.GetInfoDict();

Relaunch

Relaunch the current application when the executable path is known:

if (!EntryApplication.LaunchNewInstance("--safe-mode"))
{
    // Relaunch was not available in this environment.
}

Prefer the enumerable overload when passing user-provided or separately computed arguments:

EntryApplication.LaunchNewInstance("--profile", profileName);

var arguments = new List<string> { "--profile", profileName };
EntryApplication.LaunchNewInstance(arguments);

Bundle Detection

EntryApplication.BundleType returns an ApplicationBundleType value:

  • None
  • DotNetSingleFile
  • LinuxAppImage
  • LinuxFlatpak
  • MacOSAppBundle
  • Unknown

Convenience properties are also available:

if (EntryApplication.IsAppBundled)
{
    Console.WriteLine(EntryApplication.BundleType);
}

License

StageKit.Runtime is licensed under the MIT License.

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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on StageKit.Runtime:

Package Downloads
Updatum

Updatum is a lightweight and easy-to-integrate C# library designed to automate your application updates using GitHub Releases. It simplifies the update process by checking for new versions, retrieving release notes, and optionally downloading and launching installers or executables.

StageKit

StageKit is a lightweight .NET application infrastructure library for JSON settings, schema migrations, atomic storage, backups, support bundles, retention, onboarding state, single-instance guards, crash reports, and unhandled exception handling.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 232 5/27/2026