Altemiq.Runtime 2.0.0

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

build nuget

Altemiq.Runtime

Helpers for working with the .NET runtime itself — discovering where managed and native libraries live, resolving assemblies, and introspecting the current environment.

About

Altemiq.Runtime builds on the runtime graphs shipped in Microsoft.NETCore.Platforms to give you reliable, cross-platform answers to the questions that only the runtime can answer: where is this assembly? where are my native assets? where are the bundled tools?

Key Features

  • RuntimeEnvironment extensions — locate managed, native and tool directories and add them to PATH
  • RuntimeInformation extensions — TargetFramework, TargetPlatform and RuntimeIdentifier
  • Assembly resolution helpers (Resolve) and compatibility checks (Assembly.IsCompatible)
  • Test-host-aware entry-assembly detection (GetActualEntryAssembly)
  • String casing helpers (ToCamelCase, ToPascalCase, ToKebabCase, ToSnakeCase, RemoveSuffix)
  • A ProcessStartInfoBuilder for constructing ProcessStartInfo instances

How to Use

Installation

dotnet add package Altemiq.Runtime

Reflection

These are designed to the classes in System.Reflection

Assembly Extensions

These provide extensions to System.Reflection.Assembly and System.Reflrection.AssemblyName

IsCompatible

Determines if the supplied assembly (name) is compatible with the required assembly name.

This is useful when trying to resolve assemblies.

var assembly = Assembly.GetEntryAssembly();
var isCompatible = assembly.IsCompatible(requiredAssemblyName);
GetActualEntryAssembly

Returns the entry assembly, taking the testhost process into account so that when running under a test host you get the assembly under test rather than the host.

var entry = Assembly.GetActualEntryAssembly();

Runtime

Interop Services

These are designed to augment the classes in System.Runtime.InteropServices

Runtime Information

This provides information about the runtime

TargetFramework gets the target framework
RuntimeIdentifier gets the runtime identifier

Runtime Environment

This provides classes for interactive with the runtime environment

GetRuntimeLibraryDirectory gets the runtime folder for managed assemblies
GetRuntimeNativeDirectory gets the runtime folder for native assets

AddRuntimeLibraryDirectory adds the runtime folder for managed assemblies to the PATH environment variable
AddRuntimeNativeDirectory adds the runtime folder for native assets to the PATH environment variable
AddRuntimeDirectories combines the above methods

Tools

When there are tools associated with a nuget package, these can be accessed via RuntimeEnvironment

GetToolsDirectory gets the runtime folder for the tools

⚠️ NOTE: from .NET 10 SDK onwards, TrimDepsJsonLibrariesWithoutAssets must be set to false or else these tools will not be added to the deps.json file

  <PropertyGroup>
    <TrimDepsJsonLibrariesWithoutAssets>false</TrimDepsJsonLibrariesWithoutAssets>
  </PropertyGroup>

Resolution

The Resolve static class provides functions for resolving assemblies and tools.

  • RuntimeAssemblies() adds an AssemblyResolve handler that resolves assemblies in the managed library directory returned by GetRuntimeLibraryDirectories()
  • Remove() removes the handler added by RuntimeAssemblies()
  • Tool(executable) resolves the full path of a bundled tool executable by name

String & Globalization

Casing helpers for string, plus System.Globalization.TextInfo extensions for culture-specific casing rules.

"Hello World".ToCamelCase();    // "helloWorld"
"Hello World".ToPascalCase();   // "HelloWorld"
"Hello World".ToKebabCase();    // "hello-world"
"Hello World".ToSnakeCase();    // "hello_world"

"MyFile.txt".RemoveSuffix(".txt"); // "MyFile"

Process Start Info

Altemiq.Diagnostics.ProcessStartInfoBuilder wraps System.Diagnostics.ProcessStartInfo with settable properties and a ProcessStartInfo getter, making it simple to build and configure a start-info instance.

var startInfo = new ProcessStartInfoBuilder("myapp")
{
    WorkingDirectory = @"C:\\tools",
    CreateNoWindow = true,
};

var process = System.Diagnostics.Process.Start(startInfo.ProcessStartInfo);

Feedback & Contributing

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.6 is compatible.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net451 is compatible.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 is compatible.  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 tizen30 was computed.  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 (3)

Showing the top 3 NuGet packages that depend on Altemiq.Runtime:

Package Downloads
Altemiq.Aspire.Hosting.Grpc

gRPC support for .NET Aspire.

Altemiq.CommandLine.Native

Altemiq CommandLine assemblies.

Altemiq.Data.Spatialite.Core

Altemiq is a lightweight ADO.NET provider for SpatiaLite. This package does not include a copy of the native SpatiaLite library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 155 12/1/2026
2.0.0-beta.2 55 12/1/2026
2.0.0-beta.1 75 11/30/2026
2.0.0-beta.0 67 11/12/2026
2.0.0-beta 149 7/10/2026
1.3.1-beta.3 107 6/23/2026
1.3.1-beta.2 105 6/22/2026
1.3.1-beta.1 115 2/18/2026
1.3.1-beta.0 122 1/15/2026
1.3.1-beta 491 12/10/2025
1.3.0 10,449 11/19/2025
1.3.0-beta.4 423 11/18/2025
1.3.0-beta.3 343 11/17/2025
1.3.0-beta.2 201 10/16/2025
1.3.0-beta.1 203 10/9/2025
1.3.0-beta.0 214 7/9/2025
1.3.0-beta 261 7/8/2025
1.2.1 2,480 7/8/2025
1.2.0 264 7/8/2025
1.1.0 400 7/8/2025
Loading failed